From 4760adbf3f8e283cb83912bc51d79d531787f0ba Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 2 Mar 2010 12:39:32 +0100 Subject: Bug #51590 mysqltest: --disable_abort_on_error does not work inside while/if abort_on_error flag for stmt was set at initial parse (Re)-set flag before execution instead, also added to test --- mysql-test/t/mysqltest.test | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mysql-test/t') diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 25293ff29e7..b2d7c59a8a0 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -863,7 +863,7 @@ while ($outer) } # Test source in an if in a while which is false on 1st iteration -# Also test --error in same context +# Also test --error and --disable_abort_on_error in same context let $outer= 2; # Number of outer loops let $ifval= 0; # false 1st time while ($outer) @@ -874,6 +874,10 @@ while ($outer) --source $MYSQLTEST_VARDIR/tmp/sourced.inc --error ER_NO_SUCH_TABLE SELECT * from nowhere; + --disable_abort_on_error +# Statement giving a different error, to make sure we don't mask it + SELECT * FROM nowhere else; + --enable_abort_on_error } dec $outer; inc $ifval; -- cgit v1.2.1 From 1a6a540286e4a35e647a6802449d0e10baf2d90f Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 3 Mar 2010 11:17:00 +0100 Subject: followup test fix after 49761 --- mysql-test/t/mysqltest.test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mysql-test/t') diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index b2d7c59a8a0..0c31af8b641 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1728,7 +1728,16 @@ select 1; --reap EOF --error 1 ---exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in 2>&1 +# Must filter unpredictable extra warning from output +--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in > $MYSQL_TMP_DIR/mysqltest.out 2>&1 +--perl + my $dir= $ENV{'MYSQL_TMP_DIR'}; + open (FILE, "$dir/mysqltest.out"); + while () { + print unless /Note: net_clear/; # This shows up on rare occations + } +EOF +remove_file $MYSQL_TMP_DIR/mysqltest.out; remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in; drop table t1; -- cgit v1.2.1 From 27326d2c11d5557ac9f0472ae0522e5ed510069a Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 4 Mar 2010 11:09:09 +0100 Subject: Bug #45482 MTR2: --default-storage-engine=csv is rejected by mtr Added csv to list of builtin engines Fixed dysfunctional part of csv.test so it actuallu used csv --- mysql-test/t/csv.test | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'mysql-test/t') diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index cdf274190dd..cf6d5b6d4c1 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1553,26 +1553,25 @@ drop table t1; # whole alter table code is being tested all around the test suite already. # -create table t1 (v varchar(32) not null); +create table t1 (v varchar(32) not null) engine=csv; insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; # Fast alter, no copy performed -alter table t1 change v v2 varchar(32); +alter table t1 change v v2 varchar(32) not null; select * from t1; # Fast alter, no copy performed -alter table t1 change v2 v varchar(64); +alter table t1 change v2 v varchar(64) not null; select * from t1; update t1 set v = 'lmn' where v = 'hij'; select * from t1; # Regular alter table -alter table t1 add i int auto_increment not null primary key first; +alter table t1 add i int not null first; select * from t1; -update t1 set i=5 where i=3; +update t1 set i=3 where v = 'abc'; select * from t1; -alter table t1 change i i bigint; +alter table t1 change i i bigint not null; select * from t1; -alter table t1 add unique key (i, v); -select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); +select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc'); drop table t1; # -- cgit v1.2.1 From ddb6a95abdd2578b39a3fdff907e714baa1b81e2 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 17 Mar 2010 15:25:55 +0100 Subject: Bug #43588 mysqltest command disable_abort_on_error logs connect commands Only log connects after --error A few small test adjustments needed/possible --- mysql-test/t/innodb_mysql.test | 4 ---- mysql-test/t/mysqltest.test | 1 - 2 files changed, 5 deletions(-) (limited to 'mysql-test/t') diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index a3c11b8b8d6..9d68d01b79c 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -500,11 +500,7 @@ INSERT INTO t2 VALUES (),(); CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2 WHERE b =(SELECT a FROM t1 LIMIT 1); ---disable_query_log ---disable_result_log CONNECT (con1, localhost, root,,); ---enable_query_log ---enable_result_log CONNECTION default; DELIMITER |; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 0c31af8b641..649a5fce366 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1441,7 +1441,6 @@ EOF remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql; # connect when "disable_abort_on_error" caused "connection not found" ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --disable_abort_on_error connect (con1,localhost,root,,); connection default; -- cgit v1.2.1 From 7f20e9fd060a5cc0f3c9c3e20f5167c0dab3bb5b Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 22 Mar 2010 11:28:57 +0100 Subject: Bug #43603 mysqltest command disable_abort_on_error does not affect all built-in commands After disable_abort_on_error, behaved as if --error was in effect Add condition before die, as after queries --- mysql-test/t/mysqltest.test | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 649a5fce366..09916f4f8cf 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -325,6 +325,15 @@ eval select $mysql_errno as "after_!errno_masked_error" ; --error 1 --exec echo "disable_abort_on_error; error 1000; select 3 from t1; error 1000; select 3 from t1;" | $MYSQL_TEST 2>&1 +# ---------------------------------------------------------------------------- +# Check some non-query statements that would fail +# ---------------------------------------------------------------------------- +--exec illegal_command +--cat_file does_not_exist +--perl + exit(1); +EOF + # ---------------------------------------------------------------------------- # Switch the abort on error on and check the effect on $mysql_errno # ---------------------------------------------------------------------------- -- cgit v1.2.1 From b7ad17d06a31e0ca8b8ef771e8ba3fcd8b534b32 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Thu, 8 Jul 2010 14:36:55 +0200 Subject: Bug#46086: crash when dropping a partitioned table and the original engine is disabled Missing check that engine is available. mysql-test/include/not_blackhole.inc: new include file mysql-test/r/partition_not_blackhole.result: new result file mysql-test/std_data/parts/t1_blackhole.frm: blackhole partitioned table .frm file: create table `t1` (`id` int primary key) engine=blackhole partition by key () partitions 1; mysql-test/std_data/parts/t1_blackhole.par: .par file matching blackhole partitioned .frm mysql-test/t/partition_not_blackhole-master.opt: new master-opt to disable blackhole if compiled in. mysql-test/t/partition_not_blackhole.test: New test sql/ha_partition.cc: Added check that engine is available. --- mysql-test/t/partition_not_blackhole-master.opt | 1 + mysql-test/t/partition_not_blackhole.test | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 mysql-test/t/partition_not_blackhole-master.opt create mode 100644 mysql-test/t/partition_not_blackhole.test (limited to 'mysql-test/t') diff --git a/mysql-test/t/partition_not_blackhole-master.opt b/mysql-test/t/partition_not_blackhole-master.opt new file mode 100644 index 00000000000..1e47be930bc --- /dev/null +++ b/mysql-test/t/partition_not_blackhole-master.opt @@ -0,0 +1 @@ +--loose-skip-blackhole diff --git a/mysql-test/t/partition_not_blackhole.test b/mysql-test/t/partition_not_blackhole.test new file mode 100644 index 00000000000..222c1bb091e --- /dev/null +++ b/mysql-test/t/partition_not_blackhole.test @@ -0,0 +1,25 @@ +--source include/have_partition.inc +--source include/not_blackhole.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +let $MYSQLD_DATADIR= `SELECT @@datadir`; + +--echo # +--echo # Bug#46086: crash when dropping a partitioned table and +--echo # the original engine is disabled +--echo # Copy a .frm and .par file which was created with: +--echo # create table `t1` (`id` int primary key) engine=blackhole +--echo # partition by key () partitions 1; +--copy_file std_data/parts/t1_blackhole.frm $MYSQLD_DATADIR/test/t1.frm +--copy_file std_data/parts/t1_blackhole.par $MYSQLD_DATADIR/test/t1.par +SHOW TABLES; +--error ER_NOT_FORM_FILE +SHOW CREATE TABLE t1; +--error ER_BAD_TABLE_ERROR +DROP TABLE t1; +--list_files $MYSQLD_DATADIR/test t1* +--remove_file $MYSQLD_DATADIR/test/t1.frm +--remove_file $MYSQLD_DATADIR/test/t1.par -- cgit v1.2.1 From 8147199f62a0793f2b0936d086960aa1a9fc57fc Mon Sep 17 00:00:00 2001 From: Evgeny Potemkin Date: Mon, 2 Aug 2010 16:36:41 +0400 Subject: Bug#55648: Server crash on MIX/MAX on maximum time value A typo in the Item_cache_datetime::val_str caused an assertion to fail on the maximum time value. mysql-test/r/func_group.result: A test case for the bug#55648. mysql-test/t/func_group.test: A test case for the bug#55648. sql/item.cc: Bug#55648: Server crash on MIX/MAX on maximum time value Corrected assertion. --- mysql-test/t/func_group.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 6dbc8a05789..2914bb15d18 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -1085,3 +1085,13 @@ drop table t1; --echo # --echo End of 5.1 tests +--echo # +--echo # Bug#55648: Server crash on MIX/MAX on maximum time value +--echo # +CREATE TABLE t1(c1 TIME NOT NULL); +INSERT INTO t1 VALUES('837:59:59'); +INSERT INTO t1 VALUES('838:59:59'); +SELECT MAX(c1) FROM t1; +DROP TABLE t1; +--echo # End of the bug#55648 + -- cgit v1.2.1 From 5e92df6e0ee01cdea7865d3f0b6d02f840bf0402 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 3 Aug 2010 16:11:23 +0200 Subject: Bug #55582 mtr root detection (and if-expression execution) broken if() treated any non-numeric string as false Fixed to treat those as true instead Added some test cases Fixed missing $ in variable name in include/mix2.inc --- mysql-test/t/mysqltest.test | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 09916f4f8cf..b88cde8c8f0 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1105,6 +1105,25 @@ if (!$counter) echo Counter is not 0, (counter=0); } +# ---------------------------------------------------------------------------- +# Test if with some non-numerics +# ---------------------------------------------------------------------------- + +let $counter=alpha; +if ($counter) +{ + echo Counter is true, (counter=alpha); +} +let $counter= ; +if ($counter) +{ + echo oops, space is true; +} +if (beta) +{ + echo Beta is true; +} + # ---------------------------------------------------------------------------- # Test while, { and } # ---------------------------------------------------------------------------- -- cgit v1.2.1 From 2d2da6e79359668111b24734be0f9011f289a281 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 4 Aug 2010 10:52:45 +0200 Subject: Bug #55582 mtr root detection (and if-expression execution) broken Follow-up patch: added test cases for -0 and while --- mysql-test/t/mysqltest.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index b88cde8c8f0..031c51a0720 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1119,10 +1119,21 @@ if ($counter) { echo oops, space is true; } +let $counter=-0; +if ($counter) +{ + echo oops, -0 is true; +} if (beta) { echo Beta is true; } +let $counter=gamma; +while ($counter) +{ + echo while with string, only once; + let $counter=000; +} # ---------------------------------------------------------------------------- # Test while, { and } -- cgit v1.2.1 From 0c81dcf332bd9b3e2a68354efab9bf6ea96df2d3 Mon Sep 17 00:00:00 2001 From: Martin Hansson Date: Thu, 5 Aug 2010 12:42:14 +0200 Subject: Bug#54568: create view cause Assertion failed: 0, file .\item_subselect.cc, line 836 IN quantified predicates are never executed directly. They are rather wrapped inside nodes called IN Optimizers (Item_in_optimizer) which take care of the execution. However, this is not done during query preparation. Unfortunately the LIKE predicate pre-evaluates constant right-hand side arguments even during name resolution. Likely this is meant as an optimization. Fixed by not pre-evaluating LIKE arguments in view prepare mode. --- mysql-test/t/subselect4.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test index 440eca22828..2c6efdbaac2 100644 --- a/mysql-test/t/subselect4.test +++ b/mysql-test/t/subselect4.test @@ -62,3 +62,19 @@ FROM t3 WHERE 1 = 0 GROUP BY 1; DROP TABLE t1,t2,t3; --echo End of 5.0 tests. + +--echo # +--echo # Bug#54568: create view cause Assertion failed: 0, +--echo # file .\item_subselect.cc, line 836 +--echo # +EXPLAIN SELECT 1 LIKE ( 1 IN ( SELECT 1 ) ); +DESCRIBE SELECT 1 LIKE ( 1 IN ( SELECT 1 ) ); +--echo # None of the below should crash +CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) ); +CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) ); +DROP VIEW v1, v2; + + +--echo # +--echo # End of 5.1 tests. +--echo # -- cgit v1.2.1 From d62bfebc7ede98df28ac75ec0d0880fd07f201db Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Mon, 9 Aug 2010 13:39:59 +0200 Subject: Bug #54106 assert in Protocol::end_statement, INSERT IGNORE ... SELECT ... UNION SELECT ... This assert was triggered by INSERT IGNORE ... SELECT. The assert checks that a statement either sends OK or an error to the client. If the bug was triggered on release builds, it caused OK to be sent to the client instead of the correct error message (in this case ER_FIELD_SPECIFIED_TWICE). The reason the assert was triggered, was that lex->no_error was set to TRUE during JOIN::optimize() because of IGNORE. This causes all errors to be ignored. However, not all errors can be ignored. Some, such as ER_FIELD_SPECIFIED_TWICE will cause the INSERT to fail no matter what. But since lex->no_error was set, the critical errors were ignored, the INSERT failed and neither OK nor the error message was sent to the client. This patch fixes the problem by temporarily turning off lex->no_error in places where errors cannot be ignored during processing of INSERT ... SELECT. Test case added to insert.test. --- mysql-test/t/insert.test | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index 8f9ed6c7d06..152f43a671d 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -499,3 +499,28 @@ DROP TABLE t1, t2; --echo End of 5.0 tests. + +--echo # +--echo # Bug#54106 assert in Protocol::end_statement, +--echo # INSERT IGNORE ... SELECT ... UNION SELECT ... +--echo # + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (a INT); + +--error ER_FIELD_SPECIFIED_TWICE +INSERT INTO t1 (a, a) VALUES (1, 1); +# Verify that ER_FIELD_SPECIFIED_TWICE is not ignorable +--error ER_FIELD_SPECIFIED_TWICE +INSERT IGNORE t1 (a, a) VALUES (1, 1); + +--error ER_FIELD_SPECIFIED_TWICE +INSERT IGNORE t1 (a, a) SELECT 1,1; +# Used to cause an assert +--error ER_FIELD_SPECIFIED_TWICE +INSERT IGNORE t1 (a, a) SELECT 1,1 UNION SELECT 2,2; + +DROP TABLE t1; -- cgit v1.2.1 From 41cfa3e76966b55b8a5354f0d0b57ce624a8c95c Mon Sep 17 00:00:00 2001 From: Martin Hansson Date: Wed, 11 Aug 2010 14:13:59 +0200 Subject: Bug#54444: Do not run main.range test for products without partitioning feature The test for bug no 50939 was put in range.test which isn't such a good idea since it requires partitioning. Fixed by moving the test case to partitioning_range.test. --- mysql-test/t/partition_range.test | 41 +++++++++++++++++++++++++++++++++++++++ mysql-test/t/range.test | 41 --------------------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) (limited to 'mysql-test/t') diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test index 4d011ddc468..f386fac4998 100644 --- a/mysql-test/t/partition_range.test +++ b/mysql-test/t/partition_range.test @@ -846,3 +846,44 @@ insert into t2 values(52, 20070322, 456, 'filler') ; select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid; drop table t1, t2; + +--echo # +--echo # Bug#50939: Loose Index Scan unduly relies on engine to remember range +--echo # endpoints +--echo # +CREATE TABLE t1 ( + a INT, + b INT, + KEY ( a, b ) +) PARTITION BY HASH (a) PARTITIONS 1; + +CREATE TABLE t2 ( + a INT, + b INT, + KEY ( a, b ) +); + +INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5); + +INSERT INTO t1 SELECT a + 5, b + 5 FROM t1; +INSERT INTO t1 SELECT a + 10, b + 10 FROM t1; +INSERT INTO t1 SELECT a + 20, b + 20 FROM t1; +INSERT INTO t1 SELECT a + 40, b + 40 FROM t1; + +INSERT INTO t2 SELECT * FROM t1; + +--echo # plans should be identical +EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a; +EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a; + +FLUSH status; +SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a; +--echo # Should be no more than 4 reads. +SHOW status LIKE 'handler_read_key'; + +FLUSH status; +SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a; +--echo # Should be no more than 4 reads. +SHOW status LIKE 'handler_read_key'; + +DROP TABLE t1, t2; diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 2d2a6f75d73..5d5ad180f1a 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -1313,45 +1313,4 @@ SELECT * FROM t1 FORCE INDEX (PRIMARY) DROP TABLE t1; ---echo # ---echo # Bug#50939: Loose Index Scan unduly relies on engine to remember range ---echo # endpoints ---echo # -CREATE TABLE t1 ( - a INT, - b INT, - KEY ( a, b ) -) PARTITION BY HASH (a) PARTITIONS 1; - -CREATE TABLE t2 ( - a INT, - b INT, - KEY ( a, b ) -); - -INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5); - -INSERT INTO t1 SELECT a + 5, b + 5 FROM t1; -INSERT INTO t1 SELECT a + 10, b + 10 FROM t1; -INSERT INTO t1 SELECT a + 20, b + 20 FROM t1; -INSERT INTO t1 SELECT a + 40, b + 40 FROM t1; - -INSERT INTO t2 SELECT * FROM t1; - ---echo # plans should be identical -EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a; -EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a; - -FLUSH status; -SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a; ---echo # Should be no more than 4 reads. -SHOW status LIKE 'handler_read_key'; - -FLUSH status; -SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a; ---echo # Should be no more than 4 reads. -SHOW status LIKE 'handler_read_key'; - -DROP TABLE t1, t2; - --echo End of 5.1 tests -- cgit v1.2.1 From 53c8b221166d6d94a98e00ad4b3ba58da4d3a7eb Mon Sep 17 00:00:00 2001 From: Guilhem Bichot Date: Wed, 11 Aug 2010 19:56:56 +0200 Subject: fix for Bug #55672 "mysql_upgrade dies with internal error": it couldn't parse the --ssl option. client/mysql_upgrade.c: mysql_upgrade parses its options and passes some of them to the underlying tools (mysqlcheck etc). To do this passdown, it reconstructs a command-line-suitable text from the my_option object (which contains the option's name and option's value). For options which expect no parameter, it just had to use the option's name; for other options, it had to concatenate the option's name, a "=" symbol, and the option's value; it had code to handle this latter case, but only for GET_STR options (options taking a string as value). But since the work on WL 4738, the --ssl option, a GET_BOOL, which used to have no parameter (NO_ARG), can now have one (OPT_ARG), so with --ssl we came to the "default" label, error. Fixed by constructing the command-line-suitable representation for GET_BOOL too. For --ssl it will produce --ssl=1 ; for --ssl=0, it will produce --ssl=0. mysql-test/include/mysql_upgrade_preparation.inc: handles requirements of tests which use mysql_upgrade mysql-test/r/mysql_upgrade_ssl.result: result; without the code fix we would get "internal error". mysql-test/t/mysql_upgrade.test: This test has requirements before running; moved them to an include file in order to share with mysql_upgrade_ssl. mysql-test/t/mysql_upgrade_ssl.test: test for bug. Couldn't go into mysql_upgrade.test as this new test requires SSL support. --force is needed, in case mysql_upgrade.test run before (in which case mysql_upgrade_ssl would say that upgrade has already been done); --force forces the upgrade in all cases. --- mysql-test/t/mysql_upgrade.test | 29 +---------------------------- mysql-test/t/mysql_upgrade_ssl.test | 10 ++++++++++ 2 files changed, 11 insertions(+), 28 deletions(-) create mode 100644 mysql-test/t/mysql_upgrade_ssl.test (limited to 'mysql-test/t') diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test index 3ea612d2ca7..3c6cc45da38 100644 --- a/mysql-test/t/mysql_upgrade.test +++ b/mysql-test/t/mysql_upgrade.test @@ -1,31 +1,4 @@ -# Can't run test of external client with embedded server --- source include/not_embedded.inc - -# Only run test if "mysql_upgrade" is found ---require r/have_mysql_upgrade.result ---disable_query_log -select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade; ---enable_query_log - -# -# Hack: -# -# If running with Valgrind ($VALGRIND_TEST <> 0) then the resource -# consumption (CPU) for upgrading a large log table will be intense. -# Therefore, truncate the log table in advance and issue a statement -# that should be logged. -# -if (`SELECT $VALGRIND_TEST`) -{ - --disable_query_log - --disable_result_log - --disable_abort_on_error - TRUNCATE TABLE mysql.general_log; - SELECT 1; - --enable_abort_on_error - --enable_result_log - --enable_query_log -} +-- source include/mysql_upgrade_preparation.inc # # Basic test that we can run mysql_upgrde and that it finds the diff --git a/mysql-test/t/mysql_upgrade_ssl.test b/mysql-test/t/mysql_upgrade_ssl.test new file mode 100644 index 00000000000..d1c029bf33a --- /dev/null +++ b/mysql-test/t/mysql_upgrade_ssl.test @@ -0,0 +1,10 @@ +# mysql_upgrade tests requiring SSL support + +-- source include/have_ssl_communication.inc +-- source include/mysql_upgrade_preparation.inc + +--echo # +--echo # Bug#55672 mysql_upgrade dies with internal error +--echo # +--exec $MYSQL_UPGRADE --skip-verbose --ssl --force 2>&1 +--exit -- cgit v1.2.1 From 427efc3a402af5fe4d57fc5468a27278d95fcda6 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Fri, 13 Aug 2010 14:07:27 +0400 Subject: Disable test cases due to Bug 55966. --- mysql-test/t/disabled.def | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index ce42668542f..e2e1d76ef65 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -14,5 +14,8 @@ lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Ma mysqlhotcopy_myisam : bug#54129 2010-06-04 Horst mysqlhotcopy_archive : bug#54129 2010-06-04 Horst partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings +plugin : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 +plugin_load : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 +plugin_not_embedded : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically sp_sync : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution -- cgit v1.2.1 From 8b25c0e4dc6cb18de7ce4be25eb49c44eeab35cf Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 13 Aug 2010 16:05:46 +0300 Subject: Bug #55565: debug assertion when ordering by expressions with user variable assignments The assert() that is firing is checking if expressions that can't be null return a NULL when evaluated. MAKEDATE() function can return NULL if the second argument is less then or equal to 0. Thus its nullability depends not only on the nullability of its arguments but also on their values. Fixed by (overoptimistically) setting MAKEDATE() to be nullable despite the nullability of its arguments. Test added. Had to update one test result to reflect the metadata change. --- mysql-test/t/func_time.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index b9da946a55f..e764906c374 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -838,4 +838,15 @@ select date_sub("0069-01-01 00:00:01",INTERVAL 2 SECOND); select date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND); +# +# Bug #55565: debug assertion when ordering by expressions with user +# variable assignments +# + +CREATE TABLE t1(a DOUBLE NOT NULL); +INSERT INTO t1 VALUES (0),(9.216e-096); +--echo # should not crash +SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a); +DROP TABLE t1; + --echo End of 5.1 tests -- cgit v1.2.1