diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-26 22:54:27 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-26 22:54:27 -0500 |
commit | 7cda4bee0ef7c8a3ec85e94bc1443ceaba3a64e8 (patch) | |
tree | f8c1f556f36f026038015e7215ae88b0cb7b1ce5 /mysql-test | |
parent | ea229eb6bb29ee7b11a7d28a7d4c80a593cb1d3b (diff) | |
parent | fb71449b10100e9a0f887b1585000fbfab294f3c (diff) | |
download | mariadb-git-7cda4bee0ef7c8a3ec85e94bc1443ceaba3a64e8.tar.gz |
maria-10.0.16 merge
bzr merge -r4588 maria/10.0
Diffstat (limited to 'mysql-test')
161 files changed, 4409 insertions, 1012 deletions
diff --git a/mysql-test/include/ctype_like_cond_propagation.inc b/mysql-test/include/ctype_like_cond_propagation.inc new file mode 100644 index 00000000000..023cf2b1b30 --- /dev/null +++ b/mysql-test/include/ctype_like_cond_propagation.inc @@ -0,0 +1,39 @@ +--echo # +--echo # MDEV-7149 Constant condition propagation erroneously applied for LIKE +--echo # + +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +DROP TABLE t1; diff --git a/mysql-test/include/ctype_like_cond_propagation_utf8_german.inc b/mysql-test/include/ctype_like_cond_propagation_utf8_german.inc new file mode 100644 index 00000000000..2cfa89448bc --- /dev/null +++ b/mysql-test/include/ctype_like_cond_propagation_utf8_german.inc @@ -0,0 +1,16 @@ +--echo # +--echo # MDEV-7149 Constant condition propagation erroneously applied for LIKE +--echo # + +CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES ('ae'),('ä'); +SELECT * FROM t1 WHERE c1='ä'; +SELECT * FROM t1 WHERE c1 LIKE 'ae'; +SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +SELECT * FROM t1 WHERE CONCAT(c1)='ä'; +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae'; +SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/include/not_embedded.inc b/mysql-test/include/not_embedded.inc index c3a9c3e12c8..88185af3b15 100644 --- a/mysql-test/include/not_embedded.inc +++ b/mysql-test/include/not_embedded.inc @@ -4,8 +4,7 @@ # # The test below is redundant --- require r/not_embedded.require -disable_query_log; -select version() like '%embedded%' as 'have_embedded'; -enable_query_log; +if (`select version() like '%embedded%'`) { + This should never happen; +} diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc index 49f6dfd5364..3d53fada870 100644 --- a/mysql-test/include/restart_mysqld.inc +++ b/mysql-test/include/restart_mysqld.inc @@ -1,3 +1,4 @@ +--source include/not_embedded.inc if ($rpl_inited) { diff --git a/mysql-test/lib/My/SafeProcess/Base.pm b/mysql-test/lib/My/SafeProcess/Base.pm index 0e8c191c440..1ac0120a735 100644 --- a/mysql-test/lib/My/SafeProcess/Base.pm +++ b/mysql-test/lib/My/SafeProcess/Base.pm @@ -180,6 +180,7 @@ sub create_process { } $SIG{INT}= 'DEFAULT'; + $SIG{HUP}= 'DEFAULT'; # Make this process it's own process group to be able to kill # it and any childs(that hasn't changed group themself) diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc index f19ca622278..d6110f5f8c8 100644 --- a/mysql-test/lib/My/SafeProcess/safe_process.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process.cc @@ -141,6 +141,7 @@ extern "C" void handle_signal(int sig) // Ignore further signals signal(SIGTERM, SIG_IGN); signal(SIGINT, SIG_IGN); + signal(SIGHUP, SIG_IGN); // Continune execution, allow the child to be started and // finally terminated by monitor loop @@ -164,6 +165,7 @@ int main(int argc, char* const argv[] ) /* Install signal handlers */ sigaction(SIGTERM, &sa,NULL); sigaction(SIGINT, &sa,NULL); + sigaction(SIGHUP, &sa, NULL); sigaction(SIGCHLD, &sa,NULL); sigaction(SIGABRT, &sa_abort,NULL); @@ -231,6 +233,7 @@ int main(int argc, char* const argv[] ) // Use default signal handlers in child signal(SIGTERM, SIG_DFL); signal(SIGINT, SIG_DFL); + signal(SIGHUP, SIG_DFL); signal(SIGCHLD, SIG_DFL); // Make this process it's own process group to be able to kill diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4d9d854cc47..6bb6e5a3c79 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -109,6 +109,7 @@ require "lib/mtr_gprof.pl"; require "lib/mtr_misc.pl"; $SIG{INT}= sub { mtr_error("Got ^C signal"); }; +$SIG{HUP}= sub { mtr_error("Hangup detected on controlling terminal"); }; our $mysql_version_id; my $mysql_version_extra; @@ -262,6 +263,7 @@ our $opt_ddd; our $opt_client_ddd; my $opt_boot_ddd; our $opt_manual_gdb; +our $opt_manual_lldb; our $opt_manual_dbx; our $opt_manual_ddd; our $opt_manual_debug; @@ -923,6 +925,7 @@ sub run_worker ($) { my ($server_port, $thread_num)= @_; $SIG{INT}= sub { exit(1); }; + $SIG{HUP}= sub { exit(1); }; # Connect to server my $server = new IO::Socket::INET @@ -1172,6 +1175,7 @@ sub command_line_setup { 'gdb' => \$opt_gdb, 'client-gdb' => \$opt_client_gdb, 'manual-gdb' => \$opt_manual_gdb, + 'manual-lldb' => \$opt_manual_lldb, 'boot-gdb' => \$opt_boot_gdb, 'manual-debug' => \$opt_manual_debug, 'ddd' => \$opt_ddd, @@ -1502,6 +1506,7 @@ sub command_line_setup { { $default_vardir= "$glob_mysql_test_dir/var"; } + $default_vardir = realpath $default_vardir unless IS_WINDOWS; if ( ! $opt_vardir ) { @@ -1608,8 +1613,9 @@ sub command_line_setup { $opt_debugger= undef; } - if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd || - $opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx) + if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_lldb || + $opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_dbx || + $opt_manual_dbx) { mtr_error("You need to use the client debug options for the", "embedded server. Ex: --client-gdb"); @@ -1636,9 +1642,9 @@ sub command_line_setup { # -------------------------------------------------------------------------- # Check debug related options # -------------------------------------------------------------------------- - if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || - $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug || - $opt_dbx || $opt_client_dbx || $opt_manual_dbx || + if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || + $opt_manual_gdb || $opt_manual_lldb || $opt_manual_ddd || + $opt_manual_debug || $opt_dbx || $opt_client_dbx || $opt_manual_dbx || $opt_debugger || $opt_client_debugger ) { if ( using_extern() ) @@ -2495,6 +2501,26 @@ sub environment_setup { "$bindir/sql$opt_vs_config/mysql_tzinfo_to_sql"); $ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql); + # ---------------------------------------------------- + # replace + # ---------------------------------------------------- + my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'), + "$basedir/extra/replace", + "$bindir/extra$opt_vs_config/replace", + "$path_client_bindir/replace"); + $ENV{'REPLACE'}= native_path($exe_replace); + + # ---------------------------------------------------- + # innochecksum + # ---------------------------------------------------- + my $exe_innochecksum= + mtr_exe_maybe_exists("$bindir/extra$opt_vs_config/innochecksum", + "$path_client_bindir/innochecksum"); + if ($exe_innochecksum) + { + $ENV{'INNOCHECKSUM'}= native_path($exe_innochecksum); + } + # Create an environment variable to make it possible # to detect that valgrind is being used from test cases $ENV{'VALGRIND_TEST'}= $opt_valgrind; @@ -5455,6 +5481,10 @@ sub mysqld_start ($$) { { gdb_arguments(\$args, \$exe, $mysqld->name()); } + elsif ( $opt_manual_lldb ) + { + lldb_arguments(\$args, \$exe, $mysqld->name()); + } elsif ( $opt_ddd || $opt_manual_ddd ) { ddd_arguments(\$args, \$exe, $mysqld->name()); @@ -6001,7 +6031,6 @@ sub start_mysqltest ($) { return $proc; } - # # Modify the exe and args so that program is run in gdb in xterm # @@ -6052,6 +6081,32 @@ sub gdb_arguments { $$exe= "xterm"; } +# +# Modify the exe and args so that program is run in lldb +# +sub lldb_arguments { + my $args= shift; + my $exe= shift; + my $type= shift; + my $input= shift; + + my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type"; + unlink($lldb_init_file); + + # Put $args into a single string + my $str= join(" ", @$$args); + $input = $input ? "< $input" : ""; + + # write init file for mysqld or client + mtr_tofile($lldb_init_file, "set args $str $input\n"); + + print "\nTo start lldb for $type, type in another window:\n"; + print "cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe\n"; + + # Indicate the exe should not be started + $$exe= undef; + return; +} # # Modify the exe and args so that program is run in ddd @@ -6180,7 +6235,6 @@ sub debugger_arguments { } } - # # Modify the exe and args so that program is run in valgrind # @@ -6202,10 +6256,14 @@ sub valgrind_arguments { if -f "$glob_mysql_test_dir/valgrind.supp"; # Ensure the jemalloc works with mysqld - if ($mysqld_variables{'version-malloc-library'} ne "system" && - $$exe =~ /mysqld/) + if ($$exe =~ /mysqld/) { - mtr_add_arg($args, "--soname-synonyms=somalloc=NONE" ); + my %somalloc=( + 'system jemalloc' => 'libjemalloc*', + 'bundled jemalloc' => 'NONE' + ); + my ($syn) = $somalloc{$mysqld_variables{'version-malloc-library'}}; + mtr_add_arg($args, '--soname-synonyms=somalloc=%s', $syn) if $syn; } } @@ -6483,6 +6541,8 @@ Options for debugging the product test(s) manual-dbx Let user manually start mysqld in dbx, before running test(s) + manual-lldb Let user manually start mysqld in lldb, before running + test(s) max-save-core Limit the number of core files saved (to avoid filling up disks for heavily crashing server). Defaults to $opt_max_save_core, set to 0 for no limit. Set diff --git a/mysql-test/r/change_user_notembedded.result b/mysql-test/r/change_user_notembedded.result index 60579d15ec2..896a6045481 100644 --- a/mysql-test/r/change_user_notembedded.result +++ b/mysql-test/r/change_user_notembedded.result @@ -3,3 +3,4 @@ ERROR 28000: Access denied for user 'foo'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'foo'@'localhost' (using password: YES) ERROR 08S01: Unknown command ERROR 08S01: Unknown command +that's all diff --git a/mysql-test/r/create_or_replace.result b/mysql-test/r/create_or_replace.result index a2f06c38cb5..ff8170b7309 100644 --- a/mysql-test/r/create_or_replace.result +++ b/mysql-test/r/create_or_replace.result @@ -436,7 +436,9 @@ CREATE OR REPLACE TEMPORARY TABLE tmp LIKE t1; LOCK TABLE t1 WRITE; CREATE OR REPLACE TABLE t1 LIKE tmp; KILL QUERY con_id; +ERROR 70100: Query execution was interrupted CREATE OR REPLACE TABLE t1 (a int); KILL QUERY con_id; +ERROR 70100: Query execution was interrupted drop table t1; DROP TABLE t2; diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result index 550c47ccdaa..f35e6fd8265 100644 --- a/mysql-test/r/ctype_binary.result +++ b/mysql-test/r/ctype_binary.result @@ -2915,3 +2915,98 @@ SET sql_mode=default; # # End of 5.5 tests # +# +# Start of 10.0 tests +# +SET NAMES binary; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ('%' = concat(`test`.`t1`.`c1`)) +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result index fac9824401f..970c067b25c 100644 --- a/mysql-test/r/ctype_latin1.result +++ b/mysql-test/r/ctype_latin1.result @@ -7659,6 +7659,198 @@ DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; # End of ctype_backslash.inc +SET NAMES latin1; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +SET NAMES latin1 COLLATE latin1_bin; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; # # MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion # diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index c947689ef81..16b60aed07f 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -7700,6 +7700,276 @@ DROP TABLE t1; # Start of MariaDB-10.0 tests # +SET NAMES utf8 COLLATE utf8_unicode_ci; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('ae'),('ä'); +SELECT * FROM t1 WHERE c1='ä'; +c1 +ä +SELECT * FROM t1 WHERE c1 LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae')) +SELECT * FROM t1 WHERE CONCAT(c1)='ä'; +c1 +ä +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae')) +DROP TABLE IF EXISTS t1; +SET NAMES utf8 COLLATE utf8_german2_ci; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('ae'),('ä'); +SELECT * FROM t1 WHERE c1='ä'; +c1 +ae +ä +SELECT * FROM t1 WHERE c1 LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +c1 +ae +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae')) +SELECT * FROM t1 WHERE CONCAT(c1)='ä'; +c1 +ae +ä +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +c1 +ae +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae')) +DROP TABLE IF EXISTS t1; # # MDEV-4929 Myanmar collation # @@ -12856,5 +13126,38 @@ DROP TABLE t1; # END of ctype_myanmar.inc # # +# MDEV-7366 SELECT 'a' = BINARY 'A' returns 1 (utf8 charset, utf8_unicode_ci collation) +# +SET NAMES utf8 COLLATE utf8_unicode_ci; +SELECT 'a' = BINARY 'A'; +'a' = BINARY 'A' +0 +SELECT BINARY 'A' = 'a'; +BINARY 'A' = 'a' +0 +# +# Wrong result set for WHERE a='oe' COLLATE utf8_german2_ci AND a='oe' +# +SET NAMES utf8 COLLATE utf8_german2_ci; +CREATE TABLE t1 (a CHAR(10) CHARACTER SET utf8); +INSERT INTO t1 VALUES ('ö'),('oe'); +SELECT * FROM t1 WHERE a='oe' AND a='oe' COLLATE utf8_german2_ci; +a +oe +SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe'; +a +oe +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' AND a='oe' COLLATE utf8_german2_ci; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 'oe') and (`test`.`t1`.`a` = 'oe')) +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 'oe') and (`test`.`t1`.`a` = 'oe')) +DROP TABLE t1; +# # End of MariaDB-10.0 tests # diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 3cfc076b8a0..68435f3f41c 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -5326,6 +5326,199 @@ DROP TABLE t1; # # Start of 10.0 tests # +SET NAMES latin1, collation_connection=ucs2_bin; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +SET NAMES latin1, collation_connection=ucs2_general_ci; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +SET NAMES latin1; # # MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context # diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 43f3aa4b6c9..c752024ec7f 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -5936,6 +5936,235 @@ set max_sort_length=default; # # Start of 10.0 tests # +SET NAMES utf8 COLLATE utf8_bin; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +SET NAMES utf8; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('ae'),('ä'); +SELECT * FROM t1 WHERE c1='ä'; +c1 +ä +SELECT * FROM t1 WHERE c1 LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae')) +SELECT * FROM t1 WHERE CONCAT(c1)='ä'; +c1 +ä +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae')) +DROP TABLE IF EXISTS t1; # # MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string) # diff --git a/mysql-test/r/frm_bad_row_type-7333.result b/mysql-test/r/frm_bad_row_type-7333.result new file mode 100644 index 00000000000..4df3b70fc9f --- /dev/null +++ b/mysql-test/r/frm_bad_row_type-7333.result @@ -0,0 +1,14 @@ +call mtr.add_suppression("bad_row_type.frm: invalid value 11 for the field row_format"); +select * from bad_row_type; +category_id category_name +show create table bad_row_type; +Table Create Table +bad_row_type CREATE TABLE `bad_row_type` ( + `category_id` int(11) NOT NULL AUTO_INCREMENT, + `category_name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`category_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */ +show table status like 'bad_row_type'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +bad_row_type MyISAM 10 Dynamic 0 0 0 281474976710655 1024 0 1 x x NULL utf8_general_ci NULL `compression`='tokudb_zlib' +drop table bad_row_type; diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index bf07595bc3a..950d2e72666 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2677,3 +2677,27 @@ Warning 1292 Truncated incorrect time value: '9336:00:00' Warning 1292 Truncated incorrect time value: '2952:00:00' Warning 1292 Truncated incorrect time value: '2952:00:00' DROP TABLE t1; +# +# MDEV-7221 from_days fails after null value +# +CREATE TABLE t1 ( +id INT(11) NOT NULL PRIMARY KEY, +date1 DATE NULL DEFAULT NULL +); +INSERT INTO t1 VALUES (12, '2011-05-12'); +INSERT INTO t1 VALUES (13, NULL); +INSERT INTO t1 VALUES (14, '2009-10-23'); +INSERT INTO t1 VALUES (15, '2014-10-30'); +INSERT INTO t1 VALUES (16, NULL); +INSERT INTO t1 VALUES (17, NULL); +INSERT INTO t1 VALUES (18, '2010-10-13'); +SELECT a.id,a.date1,FROM_DAYS(TO_DAYS(a.date1)-10) as date2, DATE_ADD(a.date1,INTERVAL -10 DAY),TO_DAYS(a.date1)-10 FROM t1 a ORDER BY a.id; +id date1 date2 DATE_ADD(a.date1,INTERVAL -10 DAY) TO_DAYS(a.date1)-10 +12 2011-05-12 2011-05-02 2011-05-02 734624 +13 NULL NULL NULL NULL +14 2009-10-23 2009-10-13 2009-10-13 734058 +15 2014-10-30 2014-10-20 2014-10-20 735891 +16 NULL NULL NULL NULL +17 NULL NULL NULL NULL +18 2010-10-13 2010-10-03 2010-10-03 734413 +DROP TABLE t1; diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 0858198694b..9a259b3c4c6 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -2494,6 +2494,20 @@ WHERE t1a.c1 = c2 GROUP BY i2; i2 DROP TABLE t1,t2; # +# MDEV-6855 +# MIN(*) with subqueries with IS NOT NULL in WHERE clause crashed. +# +CREATE TABLE t1 (i INT, c VARCHAR(3), KEY(c,i)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (7,'foo'),(0,'bar'); +CREATE TABLE t2 (j INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (0),(8),(1),(8),(9); +SELECT MAX(i), c FROM t1 +WHERE c != 'qux' AND ( SELECT SUM(j) FROM t1, t2 ) IS NOT NULL GROUP BY c; +MAX(i) c +0 bar +7 foo +drop table t1,t2; +# # Bug #58782 # Missing rows with SELECT .. WHERE .. IN subquery # with full GROUP BY and no aggr diff --git a/mysql-test/r/group_by_innodb.result b/mysql-test/r/group_by_innodb.result index 4b5d9990c51..1098579a82d 100644 --- a/mysql-test/r/group_by_innodb.result +++ b/mysql-test/r/group_by_innodb.result @@ -57,3 +57,26 @@ i GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) NULL 11.1,22.2 DROP TABLE t1; End of 5.5 tests +# +# MDEV-5719: Wrong result with GROUP BY and LEFT OUTER JOIN +# +CREATE TABLE t1 (oidGroup INT, oid INT PRIMARY KEY)ENGINE=INNODB; +INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4); +CREATE TABLE t2 (oid INT PRIMARY KEY)ENGINE=INNODB; +INSERT INTO t2 VALUES (3); +SELECT a.oidGroup, a.oid, b.oid FROM t1 a LEFT JOIN t2 b ON +a.oid=b.oid WHERE a.oidGroup=1; +oidGroup oid oid +1 1 NULL +1 2 NULL +1 3 3 +1 4 NULL +SELECT a.oidGroup, a.oid, b.oid FROM t1 a LEFT JOIN t2 b ON +a.oid=b.oid WHERE a.oidGroup=1 GROUP BY a.oid; +oidGroup oid oid +1 1 NULL +1 2 NULL +1 3 3 +1 4 NULL +DROP TABLE t1, t2; +# End of tests diff --git a/mysql-test/r/insert_update_autoinc-7150.result b/mysql-test/r/insert_update_autoinc-7150.result new file mode 100644 index 00000000000..96773479310 --- /dev/null +++ b/mysql-test/r/insert_update_autoinc-7150.result @@ -0,0 +1,9 @@ +create table t1 (a int(10) auto_increment primary key, b int(11)); +insert t1 values (null,1); +insert t1 values (null,2), (1,-1), (null,3) on duplicate key update b=values(b); +select * from t1; +a b +1 -1 +2 2 +3 3 +drop table t1; diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index 8634beb290f..1146ae8bbfa 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -435,16 +435,16 @@ p i a 4 3 zzzz update t1 set p=3 where p=1; update t2 set i=2 where i=1; -show status like 'key_%'; -Variable_name Value -Key_blocks_not_flushed 0 -Key_blocks_unused KEY_BLOCKS_UNUSED -Key_blocks_used 4 -Key_blocks_warm 0 -Key_read_requests 22 -Key_reads 0 -Key_write_requests 26 -Key_writes 6 +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +VARIABLE_NAME VARIABLE_VALUE +KEY_BLOCKS_NOT_FLUSHED 0 +KEY_BLOCKS_USED 4 +KEY_BLOCKS_WARM 0 +KEY_READ_REQUESTS 22 +KEY_READS 0 +KEY_WRITE_REQUESTS 26 +KEY_WRITES 6 +select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; select * from information_schema.key_caches where segment_number is null; KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES default NULL NULL 2097152 1024 4 # 0 22 0 26 6 @@ -483,16 +483,18 @@ p i a 4 3 zzzz update t1 set p=3 where p=1; update t2 set i=2 where i=1; -show status like 'key_%'; -Variable_name Value -Key_blocks_not_flushed 0 -Key_blocks_unused KEY_BLOCKS_UNUSED -Key_blocks_used 4 -Key_blocks_warm 0 -Key_read_requests 22 -Key_reads 0 -Key_write_requests 26 -Key_writes 6 +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +VARIABLE_NAME VARIABLE_VALUE +KEY_BLOCKS_NOT_FLUSHED 0 +KEY_BLOCKS_USED 4 +KEY_BLOCKS_WARM 0 +KEY_READ_REQUESTS 22 +KEY_READS 0 +KEY_WRITE_REQUESTS 26 +KEY_WRITES 6 +select variable_value < @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; +variable_value < @key_blocks_unused +1 select * from information_schema.key_caches where segment_number is null; KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES default 2 NULL 2097152 1024 4 # 0 22 0 26 6 @@ -526,16 +528,18 @@ p i a 4 3 zzzz update t1 set p=3 where p=1; update t2 set i=2 where i=1; -show status like 'key_%'; -Variable_name Value -Key_blocks_not_flushed 0 -Key_blocks_unused KEY_BLOCKS_UNUSED -Key_blocks_used 4 -Key_blocks_warm 0 -Key_read_requests 22 -Key_reads 0 -Key_write_requests 26 -Key_writes 6 +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +VARIABLE_NAME VARIABLE_VALUE +KEY_BLOCKS_NOT_FLUSHED 0 +KEY_BLOCKS_USED 4 +KEY_BLOCKS_WARM 0 +KEY_READ_REQUESTS 22 +KEY_READS 0 +KEY_WRITE_REQUESTS 26 +KEY_WRITES 6 +select variable_value = @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; +variable_value = @key_blocks_unused +1 select * from information_schema.key_caches where segment_number is null; KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES default 1 NULL 2097152 1024 4 # 0 22 0 26 6 diff --git a/mysql-test/r/kill-2.result b/mysql-test/r/kill-2.result new file mode 100644 index 00000000000..c2bcc979441 --- /dev/null +++ b/mysql-test/r/kill-2.result @@ -0,0 +1,10 @@ +# +# MDEV-6896 kill user command cause MariaDB crash! +# +create user foo@'127.0.0.1'; +select user from information_schema.processlist; +user +foo +root +kill user foo@'127.0.0.1'; +drop user foo@'127.0.0.1'; diff --git a/mysql-test/r/kill_processlist-6619.result b/mysql-test/r/kill_processlist-6619.result index 588c8e6d139..7dd42790cc7 100644 --- a/mysql-test/r/kill_processlist-6619.result +++ b/mysql-test/r/kill_processlist-6619.result @@ -3,11 +3,15 @@ SHOW PROCESSLIST; Id User Host db Command Time State Info Progress # root # test Sleep # # NULL 0.000 # root # test Query # # SHOW PROCESSLIST 0.000 +SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go'; +SHOW PROCESSLIST; connection default; +SET DEBUG_SYNC='now WAIT_FOR ready'; KILL QUERY con_id; +SET DEBUG_SYNC='now SIGNAL go'; connection con1; -SHOW PROCESSLIST; ERROR 70100: Query execution was interrupted +SET DEBUG_SYNC='reset'; SHOW PROCESSLIST; Id User Host db Command Time State Info Progress # root # test Sleep # # NULL 0.000 diff --git a/mysql-test/r/kill_query-6728.result b/mysql-test/r/kill_query-6728.result new file mode 100644 index 00000000000..6638edebeea --- /dev/null +++ b/mysql-test/r/kill_query-6728.result @@ -0,0 +1,7 @@ +connect con1,localhost,root,,; +connection default; +kill query id; +connection con1; +select count(*) > 0 from mysql.user; +count(*) > 0 +1 diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index 4471c01c99b..04cd2f01050 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -536,7 +536,8 @@ CREATE TABLE `db_17876.slow_log_data` ( `last_insert_id` int(11) default NULL, `insert_id` int(11) default NULL, `server_id` int(11) default NULL, -`sql_text` mediumtext +`sql_text` mediumtext, +`thread_id` bigint(21) unsigned default NULL ); CREATE TABLE `db_17876.general_log_data` ( `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, diff --git a/mysql-test/r/mdev6830.result b/mysql-test/r/mdev6830.result new file mode 100644 index 00000000000..0570659e860 --- /dev/null +++ b/mysql-test/r/mdev6830.result @@ -0,0 +1,49 @@ +drop table if exists t1,t2,t3; +drop view if exists v2,v3; +CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; +CREATE TABLE t2 ( +f1 DATE, +f2 VARCHAR(1024), +f3 VARCHAR(10), +f4 DATE, +f5 VARCHAR(10), +f6 VARCHAR(10), +f7 VARCHAR(10), +f8 DATETIME, +f9 INT, +f10 VARCHAR(1024), +f11 VARCHAR(1024), +f12 INT, +f13 VARCHAR(1024) +) ENGINE=MyISAM; +CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2; +CREATE TABLE t3 ( +f1 VARCHAR(1024), +f2 VARCHAR(1024), +f3 DATETIME, +f4 VARCHAR(10), +f5 INT, +f6 VARCHAR(10), +f7 VARCHAR(1024), +f8 VARCHAR(10), +f9 INT, +f10 DATE, +f11 INT, +f12 VARCHAR(1024), +f13 VARCHAR(10), +f14 DATE, +f15 DATETIME +) ENGINE=MyISAM; +CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3; +INSERT INTO t3 VALUES +('FOO','foo','2000-08-04 00:00:00','one',1,'1','FOO','foo',1,'2004-05-09',1,'one','one','2001-12-07','2001-10-17 08:25:04'), +('BAR','bar','2001-01-01 04:52:37','two',2,'2','BAR','bar',2,'2008-01-01',2,'two','two','2006-06-19','2002-01-01 08:22:49'); +CREATE TABLE t4 (f1 VARCHAR(10), f2 INT) ENGINE=MyISAM; +SELECT * FROM t1; +pk +SELECT non_existing FROM v2; +ERROR 42S22: Unknown column 'non_existing' in 'field list' +SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5; +pk f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f1 f2 +drop table t1,t2,t3,t4; +drop view v2,v3; diff --git a/mysql-test/r/not_embedded.require b/mysql-test/r/not_embedded.require deleted file mode 100644 index b2ea98bcd0a..00000000000 --- a/mysql-test/r/not_embedded.require +++ /dev/null @@ -1,2 +0,0 @@ -have_embedded -0 diff --git a/mysql-test/r/processlist.result b/mysql-test/r/processlist.result index 0182245c278..eb3af67c5bf 100644 --- a/mysql-test/r/processlist.result +++ b/mysql-test/r/processlist.result @@ -7,9 +7,8 @@ SELECT ID, TIME,TIME_MS FROM INFORMATION_SCHEMA.PROCESSLIST WHERE CONCAT(":", ID SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed'; ID TIME TIME_MS TID 0 0.000 -SET DEBUG_SYNC = 'dispatch_command_end SIGNAL query_done EXECUTE 2'; -SET DEBUG_SYNC= 'now WAIT_FOR query_done'; -SET DEBUG_SYNC= 'now SIGNAL nosignal'; +set debug_sync='reset'; +SET debug_dbug="+d,sleep_inject_query_done_debug_sync"; select sleep(5); sleep(5) 0 diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 04eb2c90d31..92758fa134b 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -332,3 +332,19 @@ select found_rows() as count; count 2 drop table t1, t2; +create table t1 (i int, v varchar(64), key (i)); +select sql_calc_found_rows * from t1 where i = 0 order by v limit 59,2; +i v +0 foo +0 foo +select found_rows(); +found_rows() +75 +select sql_calc_found_rows * from t1 ignore index (i) where i = 0 order by v limit 59,2; +i v +0 foo +0 foo +select found_rows(); +found_rows() +75 +drop table t1; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 690905153f8..f8f4b478e65 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1456,12 +1456,6 @@ GRANT PROCESS ON *.* TO test_u@localhost; SHOW ENGINE MYISAM MUTEX; SHOW ENGINE MYISAM STATUS; DROP USER test_u@localhost; -# -# Bug #48985: show create table crashes if previous access to the table -# was killed -# -SHOW CREATE TABLE non_existent; -ERROR 70100: Query execution was interrupted End of 5.1 tests # # Bug#52593 SHOW CREATE TABLE is blocked if table is locked diff --git a/mysql-test/r/sp-innodb.result b/mysql-test/r/sp-innodb.result new file mode 100644 index 00000000000..da02957d3c9 --- /dev/null +++ b/mysql-test/r/sp-innodb.result @@ -0,0 +1,32 @@ +drop table if exists t1,t2; +drop procedure if exists p1; +# +#MDEV-6985: MariaDB crashes on stored procedure call +# +CREATE TABLE `t1` ( +`ID` int(11) NOT NULL, +PRIMARY KEY (`ID`) +) ENGINE=InnoDB; +CREATE TABLE `t2` ( +`ID` int(11) NOT NULL, +`DATE` datetime DEFAULT NULL, +PRIMARY KEY (`ID`) +) ENGINE=InnoDB; +CREATE PROCEDURE `p1`() +BEGIN +DECLARE _mySelect CURSOR FOR +SELECT DISTINCT t1.ID +FROM t1 +LEFT JOIN t2 AS t2 ON +t2.ID = t1.ID +AND t2.DATE = ( +SELECT MAX(T3.DATE) FROM t2 AS T3 WHERE T3.ID = t2.ID AND T3.DATE<=NOW() +) +WHERE t1.ID = 1; +OPEN _mySelect; +CLOSE _mySelect; +END ;; +CALL p1(); +CALL p1(); +drop procedure p1; +drop table t1,t2; diff --git a/mysql-test/r/statistics_index_crash-7362.result b/mysql-test/r/statistics_index_crash-7362.result new file mode 100644 index 00000000000..99f65d7e1b7 --- /dev/null +++ b/mysql-test/r/statistics_index_crash-7362.result @@ -0,0 +1,33 @@ +CREATE TABLE t1 (a longtext, FULLTEXT KEY (`a`)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (unhex('3E0D0A4141414142334E7A6143317963324541414141424977414141674541726D')); +ANALYZE TABLE t1 PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.index_stats WHERE index_name='a' AND table_name='t1'; +db_name table_name index_name prefix_arity avg_frequency +test t1 a 1 NULL +DROP TABLE t1; +CREATE TABLE t1 (a longtext, FULLTEXT KEY (`a`)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (unhex('3E0D0A4141414142334E7A6143317963324541414141424977414141674541726D')); +ANALYZE TABLE t1 PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.index_stats WHERE index_name='a' AND table_name='t1'; +db_name table_name index_name prefix_arity avg_frequency +test t1 a 1 NULL +DROP TABLE t1; +CREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM; +INSERT INTO geom VALUES +(MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), +(MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), +(MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))))); +ANALYZE TABLE geom PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.geom analyze status Engine-independent statistics collected +test.geom analyze status OK +SELECT * FROM mysql.index_stats WHERE index_name='g' AND table_name='geom'; +db_name table_name index_name prefix_arity avg_frequency +test geom g 1 NULL +DROP TABLE geom; diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index e7add0d80a7..38838e72e96 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -645,3 +645,49 @@ MAX(dt) = '2011-01-06 12:34:30' 1 DROP TABLE t1; End of 5.5 tests +# +# MDEV-7254: Assigned expression is evaluated twice when updating column TIMESTAMP NOT NULL +# +SET time_zone='+02:00'; +create table t1(value timestamp not null); +set @a:=0; +create function f1 () returns timestamp +begin +set @a = @a + 1; +return NULL; +end// +set timestamp=12340; +insert t1 values (f1()); +select @a, value from t1; +@a value +1 1970-01-01 05:25:40 +set timestamp=12350; +update t1 set value = f1(); +select @a, value from t1; +@a value +2 1970-01-01 05:25:50 +drop table t1; +drop function f1; +set timestamp=0; +create table t1(value timestamp null); +set @a:=0; +create function f1 () returns timestamp +begin +set @a = @a + 1; +return NULL; +end// +set timestamp=12340; +insert t1 values (f1()); +select @a, value from t1; +@a value +1 NULL +set timestamp=12350; +update t1 set value = f1(); +select @a, value from t1; +@a value +2 NULL +drop table t1; +drop function f1; +set timestamp=0; +SET time_zone=DEFAULT; +End of 10.0 tests diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index ff155e5fe15..23d1d76ca26 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -5394,6 +5394,8 @@ SELECT `f1`(1); DROP FUNCTION f1; DROP VIEW v1; DROP TABLE t1, t2; +create view v1 as select 1; +drop view v1; # ----------------------------------------------------------------- # -- End of 5.5 tests. # ----------------------------------------------------------------- diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result index d0cdd858d4a..05e4600f4b7 100644 --- a/mysql-test/r/windows.result +++ b/mysql-test/r/windows.result @@ -60,3 +60,8 @@ SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'socket'; VARIABLE_NAME SOCKET +# +# Bug#16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5 +# +xyz +def diff --git a/mysql-test/std_data/bad_row_type.MYD b/mysql-test/std_data/bad_row_type.MYD new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/mysql-test/std_data/bad_row_type.MYD diff --git a/mysql-test/std_data/bad_row_type.MYI b/mysql-test/std_data/bad_row_type.MYI Binary files differnew file mode 100644 index 00000000000..731a83ed078 --- /dev/null +++ b/mysql-test/std_data/bad_row_type.MYI diff --git a/mysql-test/std_data/bad_row_type.frm b/mysql-test/std_data/bad_row_type.frm Binary files differnew file mode 100644 index 00000000000..d993c98d73e --- /dev/null +++ b/mysql-test/std_data/bad_row_type.frm diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index ac4068a6373..bef37ac4d04 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -53,7 +53,7 @@ sub skip_combinations { $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); $skip{'t/openssl_6975.test'} = 'no or too old openssl' - unless ! IS_WINDOWS and ! system "openssl ciphers TLSv1.2 2>&1 >/dev/null"; + unless ! IS_WINDOWS and ! system "openssl ciphers TLSv1.2 >/dev/null 2>&1"; %skip; } diff --git a/mysql-test/suite/binlog/r/binlog_checkpoint.result b/mysql-test/suite/binlog/r/binlog_checkpoint.result index 2ce9ed760f5..f76fc6da189 100644 --- a/mysql-test/suite/binlog/r/binlog_checkpoint.result +++ b/mysql-test/suite/binlog/r/binlog_checkpoint.result @@ -112,6 +112,18 @@ master-bin.000003 # master-bin.000004 # master-bin.000005 # master-bin.000006 # +SET debug_sync = 'reset'; +*** MDEV-7402: 'reset master' hangs, waits for signalled COND_xid_list *** +SET debug_sync="reset_logs_after_set_reset_master_pending SIGNAL reset_master_ready WAIT_FOR reset_master_cont"; +RESET MASTER; +SET @old_dbug= @@global.DEBUG_DBUG; +SET GLOBAL debug_dbug="+d,inject_binlog_background_thread_before_mark_xid_done"; +SET debug_sync="now WAIT_FOR reset_master_ready"; +RESET MASTER; +SET debug_sync="now WAIT_FOR injected_binlog_background_thread"; +SET GLOBAL debug_dbug=@old_dbug; +SET debug_sync="now SIGNAL reset_master_cont"; +SET debug_sync = 'reset'; DROP TABLE t1, t2; SET GLOBAL max_binlog_size= @old_max_binlog_size; SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; diff --git a/mysql-test/suite/binlog/r/binlog_switch_inside_trans.result b/mysql-test/suite/binlog/r/binlog_switch_inside_trans.result index 48b6dfa61d9..0819d4e778f 100644 --- a/mysql-test/suite/binlog/r/binlog_switch_inside_trans.result +++ b/mysql-test/suite/binlog/r/binlog_switch_inside_trans.result @@ -1,6 +1,5 @@ set @save_binlog_format= @@global.binlog_format; set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates; -set @save_sql_log_bin= @@global.sql_log_bin; create table t1 (a int) engine= myisam; create table t2 (a int) engine= innodb; SELECT @@session.binlog_format; @@ -129,7 +128,7 @@ commit; begin; insert into t2 values (5); # Test that the global variable 'binlog_format' and -# 'binlog_direct_non_transactional_updates' and 'sql_log_bin' are +# 'binlog_direct_non_transactional_updates' are # writable inside a transaction. # Current session values are ROW, FALSE, TRUE respectively. SELECT @@global.binlog_format; @@ -137,20 +136,15 @@ SELECT @@global.binlog_format; ROW set @@global.binlog_format= statement; set @@global.binlog_direct_non_transactional_updates= TRUE; -set @@global.sql_log_bin= FALSE; SELECT @@global.binlog_format; @@global.binlog_format STATEMENT SELECT @@global.binlog_direct_non_transactional_updates; @@global.binlog_direct_non_transactional_updates 1 -SELECT @@global.sql_log_bin; -@@global.sql_log_bin -0 commit; set @@global.binlog_format= @save_binlog_format; set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct; -set @@global.sql_log_bin= @save_sql_log_bin; create table t3(a int, b int) engine= innodb; create table t4(a int) engine= innodb; create table t5(a int) engine= innodb; diff --git a/mysql-test/suite/binlog/t/binlog_checkpoint.test b/mysql-test/suite/binlog/t/binlog_checkpoint.test index 356f860af32..cdb71887ad6 100644 --- a/mysql-test/suite/binlog/t/binlog_checkpoint.test +++ b/mysql-test/suite/binlog/t/binlog_checkpoint.test @@ -138,8 +138,39 @@ SET DEBUG_SYNC= "now WAIT_FOR injected_binlog_background_thread"; SET GLOBAL debug_dbug= @old_dbug; INSERT INTO t1 VALUES (31, REPEAT("x", 4100)); --source include/show_binary_logs.inc +SET debug_sync = 'reset'; + + +--echo *** MDEV-7402: 'reset master' hangs, waits for signalled COND_xid_list *** + +--source include/wait_for_binlog_checkpoint.inc + +connect(con3,localhost,root,,); +# Make the binlog background thread wait before clearing the pending checkpoint. +# The bug was that one RESET MASTER would clear the reset_master_pending +# flag set by another RESET MASTER; this could cause the wakeup from the +# binlog background thread not to be sent, and thus the second RESET MASTER +# to wait infinitely. +SET debug_sync="reset_logs_after_set_reset_master_pending SIGNAL reset_master_ready WAIT_FOR reset_master_cont"; +send RESET MASTER; + +--connection default +SET @old_dbug= @@global.DEBUG_DBUG; +SET GLOBAL debug_dbug="+d,inject_binlog_background_thread_before_mark_xid_done"; +SET debug_sync="now WAIT_FOR reset_master_ready"; +RESET MASTER; +SET debug_sync="now WAIT_FOR injected_binlog_background_thread"; +SET GLOBAL debug_dbug=@old_dbug; +SET debug_sync="now SIGNAL reset_master_cont"; + +--connection con3 +REAP; + +--connection default +SET debug_sync = 'reset'; +# Clean up. DROP TABLE t1, t2; SET GLOBAL max_binlog_size= @old_max_binlog_size; SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; diff --git a/mysql-test/suite/binlog/t/binlog_grant.test b/mysql-test/suite/binlog/t/binlog_grant.test index f0367b3aa79..0c9d9a45ec9 100644 --- a/mysql-test/suite/binlog/t/binlog_grant.test +++ b/mysql-test/suite/binlog/t/binlog_grant.test @@ -15,7 +15,7 @@ show grants for mysqltest_1@localhost; connect (plain,localhost,mysqltest_1,,test); connect (root,localhost,root,,test); -# Testing setting both session and global SQL_LOG_BIN variable both as +# Testing setting session SQL_LOG_BIN variable both as # root and as plain user. --echo **** Variable SQL_LOG_BIN **** diff --git a/mysql-test/suite/binlog/t/binlog_switch_inside_trans.test b/mysql-test/suite/binlog/t/binlog_switch_inside_trans.test index 06c5e78bd0e..a93cd44fa17 100644 --- a/mysql-test/suite/binlog/t/binlog_switch_inside_trans.test +++ b/mysql-test/suite/binlog/t/binlog_switch_inside_trans.test @@ -10,7 +10,6 @@ source include/have_binlog_format_row.inc; set @save_binlog_format= @@global.binlog_format; set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates; -set @save_sql_log_bin= @@global.sql_log_bin; create table t1 (a int) engine= myisam; create table t2 (a int) engine= innodb; @@ -117,21 +116,18 @@ commit; begin; insert into t2 values (5); --echo # Test that the global variable 'binlog_format' and ---echo # 'binlog_direct_non_transactional_updates' and 'sql_log_bin' are +--echo # 'binlog_direct_non_transactional_updates' are --echo # writable inside a transaction. --echo # Current session values are ROW, FALSE, TRUE respectively. SELECT @@global.binlog_format; set @@global.binlog_format= statement; set @@global.binlog_direct_non_transactional_updates= TRUE; - set @@global.sql_log_bin= FALSE; SELECT @@global.binlog_format; SELECT @@global.binlog_direct_non_transactional_updates; - SELECT @@global.sql_log_bin; commit; set @@global.binlog_format= @save_binlog_format; set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct; -set @@global.sql_log_bin= @save_sql_log_bin; create table t3(a int, b int) engine= innodb; create table t4(a int) engine= innodb; diff --git a/mysql-test/suite/engines/funcs/combinations b/mysql-test/suite/engines/funcs/combinations new file mode 100644 index 00000000000..4d236d27b8f --- /dev/null +++ b/mysql-test/suite/engines/funcs/combinations @@ -0,0 +1,11 @@ +[innodb] +innodb +default-storage-engine=innodb +partition + +[myisam] +skip-innodb +default-storage-engine=myisam +partition + + diff --git a/mysql-test/suite/engines/funcs/r/db_create_drop.result b/mysql-test/suite/engines/funcs/r/db_create_drop.result index 89c3b3ce991..85a871cf135 100644 --- a/mysql-test/suite/engines/funcs/r/db_create_drop.result +++ b/mysql-test/suite/engines/funcs/r/db_create_drop.result @@ -2,8 +2,8 @@ DROP DATABASE IF EXISTS d1; CREATE DATABASE d1; SHOW DATABASES; Database -information_schema d1 +information_schema mtr mysql performance_schema @@ -13,8 +13,8 @@ Database (d%) d1 SHOW DATABASES LIKE '%'; Database (%) -information_schema d1 +information_schema mtr mysql performance_schema @@ -24,8 +24,8 @@ DROP DATABASE d1; CREATE SCHEMA d1; SHOW SCHEMAS; Database -information_schema d1 +information_schema mtr mysql performance_schema @@ -35,8 +35,8 @@ Database (d%) d1 SHOW SCHEMAS LIKE '%'; Database (%) -information_schema d1 +information_schema mtr mysql performance_schema diff --git a/mysql-test/suite/engines/funcs/r/db_create_error.result b/mysql-test/suite/engines/funcs/r/db_create_error.result index 35d5d4abfeb..d18fe7ee5fd 100644 --- a/mysql-test/suite/engines/funcs/r/db_create_error.result +++ b/mysql-test/suite/engines/funcs/r/db_create_error.result @@ -2,8 +2,8 @@ DROP DATABASE IF EXISTS d4; CREATE DATABASE d4; SHOW DATABASES; Database -information_schema d4 +information_schema mtr mysql performance_schema diff --git a/mysql-test/suite/engines/funcs/r/db_create_if_not_exists.result b/mysql-test/suite/engines/funcs/r/db_create_if_not_exists.result index c9e31817910..2637087da5b 100644 --- a/mysql-test/suite/engines/funcs/r/db_create_if_not_exists.result +++ b/mysql-test/suite/engines/funcs/r/db_create_if_not_exists.result @@ -5,8 +5,8 @@ Warnings: Note 1007 Can't create database 'd2'; database exists SHOW DATABASES; Database -information_schema d2 +information_schema mtr mysql performance_schema @@ -22,8 +22,8 @@ Warnings: Note 1007 Can't create database 'd2'; database exists SHOW DATABASES; Database -information_schema d2 +information_schema mtr mysql performance_schema diff --git a/mysql-test/suite/engines/funcs/r/db_drop_error.result b/mysql-test/suite/engines/funcs/r/db_drop_error.result index 8db8cb598af..24a51768103 100644 --- a/mysql-test/suite/engines/funcs/r/db_drop_error.result +++ b/mysql-test/suite/engines/funcs/r/db_drop_error.result @@ -2,8 +2,8 @@ DROP DATABASE IF EXISTS d5; CREATE DATABASE d5; SHOW DATABASES; Database -information_schema d5 +information_schema mtr mysql performance_schema diff --git a/mysql-test/suite/engines/funcs/r/db_use_error.result b/mysql-test/suite/engines/funcs/r/db_use_error.result index 2051b56b19e..c2fce4f0acf 100644 --- a/mysql-test/suite/engines/funcs/r/db_use_error.result +++ b/mysql-test/suite/engines/funcs/r/db_use_error.result @@ -2,8 +2,8 @@ DROP DATABASE IF EXISTS d6; CREATE DATABASE d6; SHOW DATABASES; Database -information_schema d6 +information_schema mtr mysql performance_schema diff --git a/mysql-test/suite/engines/funcs/r/sf_alter.result b/mysql-test/suite/engines/funcs/r/sf_alter.result index 8885b20d557..e89f529ba09 100644 --- a/mysql-test/suite/engines/funcs/r/sf_alter.result +++ b/mysql-test/suite/engines/funcs/r/sf_alter.result @@ -35,8 +35,6 @@ ALTER FUNCTION sf1 #DET# ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -54,8 +52,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -76,9 +72,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -105,8 +98,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -172,8 +163,6 @@ ALTER FUNCTION sf1 #DET# CONTAINS SQL ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -191,8 +180,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -213,9 +200,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -242,8 +226,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -309,8 +291,6 @@ ALTER FUNCTION sf1 #DET# NO SQL ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -328,8 +308,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -350,9 +328,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -379,8 +354,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -446,8 +419,6 @@ ALTER FUNCTION sf1 #DET# READS SQL DATA ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -465,8 +436,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -487,9 +456,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -516,8 +482,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -583,8 +547,6 @@ ALTER FUNCTION sf1 #DET# MODIFIES SQL DATA ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -602,8 +564,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -624,9 +584,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -653,8 +610,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -720,8 +675,6 @@ ALTER FUNCTION sf1 #DET# COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -739,8 +692,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -761,9 +712,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -790,8 +738,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -857,8 +803,6 @@ ALTER FUNCTION sf1 #DET# CONTAINS SQL COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -876,8 +820,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -898,9 +840,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -927,8 +866,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -994,8 +931,6 @@ ALTER FUNCTION sf1 #DET# NO SQL COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1013,8 +948,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1035,9 +968,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1064,8 +994,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1131,8 +1059,6 @@ ALTER FUNCTION sf1 #DET# READS SQL DATA COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1150,8 +1076,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1172,9 +1096,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1201,8 +1122,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1268,8 +1187,6 @@ ALTER FUNCTION sf1 #DET# MODIFIES SQL DATA COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1287,8 +1204,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1309,9 +1224,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1338,8 +1250,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1405,8 +1315,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1424,8 +1332,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1446,9 +1352,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1475,8 +1378,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1542,8 +1443,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# CONTAINS SQL ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1561,8 +1460,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1583,9 +1480,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1612,8 +1506,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1679,8 +1571,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# NO SQL ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1698,8 +1588,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1720,9 +1608,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1749,8 +1634,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1816,8 +1699,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# READS SQL DATA ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1835,8 +1716,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1857,9 +1736,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1886,8 +1762,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1953,8 +1827,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# MODIFIES SQL DATA ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1972,8 +1844,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1994,9 +1864,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2023,8 +1890,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2090,8 +1955,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2109,8 +1972,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2131,9 +1992,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2160,8 +2018,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2227,8 +2083,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# CONTAINS SQL COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2246,8 +2100,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2268,9 +2120,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2297,8 +2146,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2364,8 +2211,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# NO SQL COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2383,8 +2228,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2405,9 +2248,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2434,8 +2274,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2501,8 +2339,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# READS SQL DATA COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2520,8 +2356,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2542,9 +2376,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2571,8 +2402,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2638,8 +2467,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# MODIFIES SQL DATA COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2657,8 +2484,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2679,9 +2504,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2708,8 +2530,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2775,8 +2595,6 @@ ALTER FUNCTION sf1 #DET# SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2794,8 +2612,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2816,9 +2632,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2845,8 +2658,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2912,8 +2723,6 @@ ALTER FUNCTION sf1 #DET# CONTAINS SQL SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2931,8 +2740,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2953,9 +2760,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2982,8 +2786,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3049,8 +2851,6 @@ ALTER FUNCTION sf1 #DET# NO SQL SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3068,8 +2868,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3090,9 +2888,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3119,8 +2914,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3186,8 +2979,6 @@ ALTER FUNCTION sf1 #DET# READS SQL DATA SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3205,8 +2996,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3227,9 +3016,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3256,8 +3042,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3323,8 +3107,6 @@ ALTER FUNCTION sf1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3342,8 +3124,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3364,9 +3144,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3393,8 +3170,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3460,8 +3235,6 @@ ALTER FUNCTION sf1 #DET# SQL SECURITY INVOKER COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3479,8 +3252,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3501,9 +3272,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3530,8 +3298,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3597,8 +3363,6 @@ ALTER FUNCTION sf1 #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3616,8 +3380,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3638,9 +3400,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3667,8 +3426,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3734,8 +3491,6 @@ ALTER FUNCTION sf1 #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3753,8 +3508,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3775,9 +3528,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3804,8 +3554,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3871,8 +3619,6 @@ ALTER FUNCTION sf1 #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3890,8 +3636,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3912,9 +3656,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3941,8 +3682,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4008,8 +3747,6 @@ ALTER FUNCTION sf1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comm SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4027,8 +3764,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4049,9 +3784,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4078,8 +3810,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4145,8 +3875,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4164,8 +3892,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4186,9 +3912,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4215,8 +3938,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4282,8 +4003,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4301,8 +4020,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4323,9 +4040,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4352,8 +4066,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4419,8 +4131,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4438,8 +4148,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4460,9 +4168,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4489,8 +4194,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4556,8 +4259,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4575,8 +4276,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4597,9 +4296,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4626,8 +4322,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4693,8 +4387,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4712,8 +4404,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4734,9 +4424,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4763,8 +4450,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4830,8 +4515,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# SQL SECURITY INVOKER COMMENT 'comment' SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4849,8 +4532,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4871,9 +4552,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4900,8 +4578,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4967,8 +4643,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -4986,8 +4660,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5008,9 +4680,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5037,8 +4706,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5104,8 +4771,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comm SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5123,8 +4788,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5145,9 +4808,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5174,8 +4834,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5241,8 +4899,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER COMME SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5260,8 +4916,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5282,9 +4936,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5311,8 +4962,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5378,8 +5027,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER CO SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5397,8 +5044,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5419,9 +5064,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5448,8 +5090,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5515,8 +5155,6 @@ ALTER FUNCTION sf1 #DET# SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5534,8 +5172,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5556,9 +5192,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5585,8 +5218,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5652,8 +5283,6 @@ ALTER FUNCTION sf1 #DET# CONTAINS SQL SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5671,8 +5300,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5693,9 +5320,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5722,8 +5346,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5789,8 +5411,6 @@ ALTER FUNCTION sf1 #DET# NO SQL SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5808,8 +5428,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5830,9 +5448,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5859,8 +5474,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5926,8 +5539,6 @@ ALTER FUNCTION sf1 #DET# READS SQL DATA SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5945,8 +5556,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5967,9 +5576,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -5996,8 +5602,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6063,8 +5667,6 @@ ALTER FUNCTION sf1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6082,8 +5684,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6104,9 +5704,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6133,8 +5730,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6200,8 +5795,6 @@ ALTER FUNCTION sf1 #DET# SQL SECURITY DEFINER COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6219,8 +5812,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6241,9 +5832,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6270,8 +5858,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6337,8 +5923,6 @@ ALTER FUNCTION sf1 #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6356,8 +5940,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6378,9 +5960,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6407,8 +5986,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6474,8 +6051,6 @@ ALTER FUNCTION sf1 #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6493,8 +6068,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6515,9 +6088,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6544,8 +6114,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6611,8 +6179,6 @@ ALTER FUNCTION sf1 #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'commen SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6630,8 +6196,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6652,9 +6216,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6681,8 +6242,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6748,8 +6307,6 @@ ALTER FUNCTION sf1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'com SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6767,8 +6324,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6789,9 +6344,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6818,8 +6370,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6885,8 +6435,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6904,8 +6452,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6926,9 +6472,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -6955,8 +6498,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7022,8 +6563,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7041,8 +6580,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7063,9 +6600,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7092,8 +6626,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7159,8 +6691,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7178,8 +6708,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7200,9 +6728,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7229,8 +6754,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7296,8 +6819,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER ; SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7315,8 +6836,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7337,9 +6856,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7366,8 +6882,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7433,8 +6947,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7452,8 +6964,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7474,9 +6984,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7503,8 +7010,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7570,8 +7075,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# SQL SECURITY DEFINER COMMENT 'comment' SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7589,8 +7092,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7611,9 +7112,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7640,8 +7138,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7707,8 +7203,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER COMMEN SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7726,8 +7220,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7748,9 +7240,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7777,8 +7266,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7844,8 +7331,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER COMMENT 'com SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7863,8 +7348,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7885,9 +7368,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7914,8 +7394,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -7981,8 +7459,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER COMM SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -8000,8 +7476,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -8022,9 +7496,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -8051,8 +7522,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -8118,8 +7587,6 @@ ALTER FUNCTION sf1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER C SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -8137,8 +7604,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -8159,9 +7624,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -8188,8 +7650,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 diff --git a/mysql-test/suite/engines/funcs/r/sf_cursor.result b/mysql-test/suite/engines/funcs/r/sf_cursor.result index e43bcaa50a3..2fe2171b39d 100644 --- a/mysql-test/suite/engines/funcs/r/sf_cursor.result +++ b/mysql-test/suite/engines/funcs/r/sf_cursor.result @@ -34,8 +34,6 @@ END// SELECT sf1(); sf1() 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -53,8 +51,6 @@ id data 2 1 3 3 INSERT INTO t4 VALUES(sf1()); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -75,9 +71,6 @@ id data 3 3 3 3 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -104,8 +97,6 @@ id data 3 3 3 3 DELETE FROM t4 WHERE i = sf1() + 1; -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 diff --git a/mysql-test/suite/engines/funcs/r/sp_alter.result b/mysql-test/suite/engines/funcs/r/sp_alter.result index 794a692edc4..22036fecde7 100644 --- a/mysql-test/suite/engines/funcs/r/sp_alter.result +++ b/mysql-test/suite/engines/funcs/r/sp_alter.result @@ -31,8 +31,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -82,8 +80,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# CONTAINS SQL ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -133,8 +129,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# NO SQL ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -184,8 +178,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# READS SQL DATA ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -235,8 +227,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -286,8 +276,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -337,8 +325,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# CONTAINS SQL COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -388,8 +374,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# NO SQL COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -439,8 +423,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# READS SQL DATA COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -490,8 +472,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -541,8 +521,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -592,8 +570,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -643,8 +619,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -694,8 +668,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -745,8 +717,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -796,8 +766,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -847,8 +815,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -898,8 +864,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -949,8 +913,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1000,8 +962,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1051,8 +1011,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1102,8 +1060,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1153,8 +1109,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1204,8 +1158,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1255,8 +1207,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1306,8 +1256,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1357,8 +1305,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1408,8 +1354,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1459,8 +1403,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1510,8 +1452,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1561,8 +1501,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1612,8 +1550,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1663,8 +1599,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1714,8 +1648,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1765,8 +1697,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1816,8 +1746,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1867,8 +1795,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1918,8 +1844,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -1969,8 +1893,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2020,8 +1942,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2071,8 +1991,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2122,8 +2040,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2173,8 +2089,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2224,8 +2138,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2275,8 +2187,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2326,8 +2236,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2377,8 +2285,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2428,8 +2334,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2479,8 +2383,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2530,8 +2432,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2581,8 +2481,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2632,8 +2530,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2683,8 +2579,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2734,8 +2628,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2785,8 +2677,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2836,8 +2726,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2887,8 +2775,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2938,8 +2824,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -2989,8 +2873,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 @@ -3040,8 +2922,6 @@ CLOSE cur2; END// ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ; CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 diff --git a/mysql-test/suite/engines/funcs/r/sp_cursor.result b/mysql-test/suite/engines/funcs/r/sp_cursor.result index 58383f8a9cb..6ce2aae030c 100644 --- a/mysql-test/suite/engines/funcs/r/sp_cursor.result +++ b/mysql-test/suite/engines/funcs/r/sp_cursor.result @@ -30,8 +30,6 @@ CLOSE cur1; CLOSE cur2; END// CALL sp1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed SELECT * FROM t1 ORDER BY id; id data 1 1 diff --git a/mysql-test/suite/engines/funcs/r/sq_error.result b/mysql-test/suite/engines/funcs/r/sq_error.result index c983ff73d12..2090f4b9cd4 100644 --- a/mysql-test/suite/engines/funcs/r/sq_error.result +++ b/mysql-test/suite/engines/funcs/r/sq_error.result @@ -16,7 +16,7 @@ SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 VARCHAR(100),c3 FLOAT); @@ -35,7 +35,7 @@ SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 BINARY(100),c3 FLOAT); @@ -54,7 +54,7 @@ SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 VARBINARY(100),c3 FLOAT); @@ -73,6 +73,6 @@ SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/engines/funcs/r/ta_rename.result b/mysql-test/suite/engines/funcs/r/ta_rename.result index 892a49c9708..f9e78428f9e 100644 --- a/mysql-test/suite/engines/funcs/r/ta_rename.result +++ b/mysql-test/suite/engines/funcs/r/ta_rename.result @@ -14,7 +14,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -39,7 +39,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -64,7 +64,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -89,7 +89,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -114,7 +114,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -139,7 +139,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -164,7 +164,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -189,7 +189,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -214,7 +214,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -239,7 +239,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -264,7 +264,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -289,7 +289,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -314,7 +314,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -339,7 +339,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -364,7 +364,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -389,7 +389,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -414,7 +414,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -439,7 +439,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -464,7 +464,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -489,7 +489,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -514,7 +514,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -539,7 +539,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -564,7 +564,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -589,7 +589,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -614,7 +614,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -639,7 +639,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -664,7 +664,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -689,7 +689,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -714,7 +714,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -739,7 +739,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -764,7 +764,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -789,7 +789,7 @@ SHOW TABLES; Tables_in_test t2 DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/suite/engines/funcs/r/tc_rename_error.result b/mysql-test/suite/engines/funcs/r/tc_rename_error.result index bd1c2abc057..cd5108107fb 100644 --- a/mysql-test/suite/engines/funcs/r/tc_rename_error.result +++ b/mysql-test/suite/engines/funcs/r/tc_rename_error.result @@ -15,7 +15,7 @@ ERROR 42S01: Table 't1' already exists RENAME TABLE t3 TO t1; ERROR 42S01: Table 't1' already exists RENAME TABLE t3 TO doesnotexist.t1; -ERROR HY000: Can't find file: './test/t3.frm' (errno: 2 "No such file or directory") +ERROR 42S02: Table 'test.t3' doesn't exist SHOW TABLES; Tables_in_test t1 diff --git a/mysql-test/suite/engines/funcs/t/db_create_drop.test b/mysql-test/suite/engines/funcs/t/db_create_drop.test index 119db90293c..a807c146206 100644 --- a/mysql-test/suite/engines/funcs/t/db_create_drop.test +++ b/mysql-test/suite/engines/funcs/t/db_create_drop.test @@ -2,14 +2,18 @@ DROP DATABASE IF EXISTS d1; --enable_warnings CREATE DATABASE d1; +--sorted_result SHOW DATABASES; SHOW DATABASES LIKE 'd%'; +--sorted_result SHOW DATABASES LIKE '%'; USE d1; DROP DATABASE d1; CREATE SCHEMA d1; +--sorted_result SHOW SCHEMAS; SHOW SCHEMAS LIKE 'd%'; +--sorted_result SHOW SCHEMAS LIKE '%'; USE d1; DROP SCHEMA d1; diff --git a/mysql-test/suite/engines/funcs/t/db_create_error.test b/mysql-test/suite/engines/funcs/t/db_create_error.test index d88ef846b4b..ca83e5f0806 100644 --- a/mysql-test/suite/engines/funcs/t/db_create_error.test +++ b/mysql-test/suite/engines/funcs/t/db_create_error.test @@ -2,9 +2,11 @@ DROP DATABASE IF EXISTS d4; --enable_warnings CREATE DATABASE d4; +--sorted_result SHOW DATABASES; --error 1007 CREATE DATABASE d4; DROP DATABASE d4; +--sorted_result SHOW DATABASES; diff --git a/mysql-test/suite/engines/funcs/t/db_create_if_not_exists.test b/mysql-test/suite/engines/funcs/t/db_create_if_not_exists.test index 4e631d5657a..7b130504308 100644 --- a/mysql-test/suite/engines/funcs/t/db_create_if_not_exists.test +++ b/mysql-test/suite/engines/funcs/t/db_create_if_not_exists.test @@ -3,12 +3,14 @@ DROP DATABASE IF EXISTS d2; --enable_warnings CREATE DATABASE d2; CREATE DATABASE IF NOT EXISTS d2; +--sorted_result SHOW DATABASES; USE d2; DROP DATABASE d2; DROP DATABASE IF EXISTS d2; CREATE SCHEMA d2; CREATE SCHEMA IF NOT EXISTS d2; +--sorted_result SHOW DATABASES; USE d2; DROP SCHEMA d2; diff --git a/mysql-test/suite/engines/funcs/t/db_drop_error.test b/mysql-test/suite/engines/funcs/t/db_drop_error.test index f21b8b4e817..7fd6738cf1f 100644 --- a/mysql-test/suite/engines/funcs/t/db_drop_error.test +++ b/mysql-test/suite/engines/funcs/t/db_drop_error.test @@ -6,5 +6,6 @@ SHOW DATABASES; --error 1008 DROP DATABASE nond5; DROP DATABASE d5; +--sorted_result SHOW DATABASES; diff --git a/mysql-test/suite/engines/funcs/t/db_use_error.test b/mysql-test/suite/engines/funcs/t/db_use_error.test index 00a411ed5cb..9220660f84e 100644 --- a/mysql-test/suite/engines/funcs/t/db_use_error.test +++ b/mysql-test/suite/engines/funcs/t/db_use_error.test @@ -6,5 +6,6 @@ SHOW DATABASES; --error 1064 USE DATABASE nond6; DROP DATABASE d6; +--sorted_result SHOW DATABASES; diff --git a/mysql-test/suite/engines/funcs/t/rpl_row_until.test b/mysql-test/suite/engines/funcs/t/rpl_row_until.test index bf38bd487ea..7c1715b760e 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_row_until.test +++ b/mysql-test/suite/engines/funcs/t/rpl_row_until.test @@ -11,18 +11,18 @@ INSERT INTO t1 VALUES (1),(2),(3),(4); DROP TABLE t1; # Save master log position for query DROP TABLE t1 save_master_pos; -let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 7); -let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 7); +let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 10); +let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 10); CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); # Save master log position for query CREATE TABLE t2 save_master_pos; -let $master_pos_create_t2= query_get_value(SHOW BINLOG EVENTS, Pos, 8); +let $master_pos_create_t2= query_get_value(SHOW BINLOG EVENTS, Pos, 12); INSERT INTO t2 VALUES (1),(2); save_master_pos; # Save master log position for query INSERT INTO t2 VALUES (1),(2); -let $master_pos_insert1_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 12); +let $master_pos_insert1_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 17); sync_slave_with_master; # Save relay log position for query INSERT INTO t2 VALUES (1),(2); @@ -31,8 +31,8 @@ let $relay_pos_insert1_t2= query_get_value(show slave status, Relay_Log_Pos, 1); connection master; INSERT INTO t2 VALUES (3),(4); DROP TABLE t2; -# Save master log position for query INSERT INTO t2 VALUES (1),(2); -let $master_pos_drop_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 17); +# Save master log position for query DROP TABLE t2; +let $master_pos_drop_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 23); sync_slave_with_master; --source include/stop_slave.inc diff --git a/mysql-test/suite/engines/funcs/t/tc_rename_error.test b/mysql-test/suite/engines/funcs/t/tc_rename_error.test index 91efeacaeef..3fc4901a364 100644 --- a/mysql-test/suite/engines/funcs/t/tc_rename_error.test +++ b/mysql-test/suite/engines/funcs/t/tc_rename_error.test @@ -11,7 +11,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher RENAME TABLE t2 TO t1; --error 1050 RENAME TABLE t3 TO t1; ---error 1017 +--error 1146 RENAME TABLE t3 TO doesnotexist.t1; SHOW TABLES; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; diff --git a/mysql-test/suite/engines/iuds/combinations b/mysql-test/suite/engines/iuds/combinations new file mode 100644 index 00000000000..2077c41a7be --- /dev/null +++ b/mysql-test/suite/engines/iuds/combinations @@ -0,0 +1,8 @@ +[innodb] +innodb +default-storage-engine=innodb + +[myisam] +skip-innodb +default-storage-engine=myisam + diff --git a/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result b/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result Binary files differindex 08eecb1c17d..fdd1a4be290 100644 --- a/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result +++ b/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result diff --git a/mysql-test/suite/engines/iuds/r/strings_update_delete.result b/mysql-test/suite/engines/iuds/r/strings_update_delete.result index 283f39efe84..159d2608ea1 100644 --- a/mysql-test/suite/engines/iuds/r/strings_update_delete.result +++ b/mysql-test/suite/engines/iuds/r/strings_update_delete.result @@ -70471,17 +70471,17 @@ SIZE DROP TABLE t17,t18; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18; Warnings: -Note 1051 Unknown table 't3' -Note 1051 Unknown table 't4' -Note 1051 Unknown table 't5' -Note 1051 Unknown table 't6' -Note 1051 Unknown table 't7' -Note 1051 Unknown table 't8' -Note 1051 Unknown table 't9' -Note 1051 Unknown table 't10' -Note 1051 Unknown table 't11' -Note 1051 Unknown table 't13' -Note 1051 Unknown table 't14' -Note 1051 Unknown table 't15' -Note 1051 Unknown table 't17' -Note 1051 Unknown table 't18' +Note 1051 Unknown table 'test.t3' +Note 1051 Unknown table 'test.t4' +Note 1051 Unknown table 'test.t5' +Note 1051 Unknown table 'test.t6' +Note 1051 Unknown table 'test.t7' +Note 1051 Unknown table 'test.t8' +Note 1051 Unknown table 'test.t9' +Note 1051 Unknown table 'test.t10' +Note 1051 Unknown table 'test.t11' +Note 1051 Unknown table 'test.t13' +Note 1051 Unknown table 'test.t14' +Note 1051 Unknown table 'test.t15' +Note 1051 Unknown table 'test.t17' +Note 1051 Unknown table 'test.t18' diff --git a/mysql-test/suite/engines/iuds/r/type_bit_iuds.result b/mysql-test/suite/engines/iuds/r/type_bit_iuds.result index 7cfeb1958cf..b7a910f36e6 100644 --- a/mysql-test/suite/engines/iuds/r/type_bit_iuds.result +++ b/mysql-test/suite/engines/iuds/r/type_bit_iuds.result @@ -780,7 +780,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'0'; 0 + b'0' 0 @@ -1611,7 +1611,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'0'; 0 + b'0' 0 @@ -2461,7 +2461,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'0'; 0 + b'0' 0 @@ -3375,7 +3375,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'0'; 0 + b'0' 0 @@ -4574,7 +4574,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'0'; 0 + b'0' 0 @@ -5978,7 +5978,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'0'; 0 + b'0' 0 @@ -8049,7 +8049,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'0'; 0 + b'0' 0 @@ -11227,7 +11227,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1'; 0 + b'1' 1 @@ -12009,7 +12009,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1'; 0 + b'1' 1 @@ -12840,7 +12840,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1'; 0 + b'1' 1 @@ -13690,7 +13690,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1'; 0 + b'1' 1 @@ -14604,7 +14604,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1'; 0 + b'1' 1 @@ -15803,7 +15803,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1'; 0 + b'1' 1 @@ -17207,7 +17207,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1'; 0 + b'1' 1 @@ -19278,7 +19278,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1'; 0 + b'1' 1 @@ -22456,7 +22456,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'10'; 0 + b'10' 2 @@ -23244,7 +23244,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'10'; 0 + b'10' 2 @@ -24081,7 +24081,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'10'; 0 + b'10' 2 @@ -24931,7 +24931,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'10'; 0 + b'10' 2 @@ -25845,7 +25845,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'10'; 0 + b'10' 2 @@ -27044,7 +27044,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'10'; 0 + b'10' 2 @@ -28448,7 +28448,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'10'; 0 + b'10' 2 @@ -30519,7 +30519,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'10'; 0 + b'10' 2 @@ -33697,7 +33697,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010'; 0 + b'1010' 10 @@ -34485,7 +34485,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010'; 0 + b'1010' 10 @@ -35322,7 +35322,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010'; 0 + b'1010' 10 @@ -36178,7 +36178,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010'; 0 + b'1010' 10 @@ -37092,7 +37092,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010'; 0 + b'1010' 10 @@ -38291,7 +38291,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010'; 0 + b'1010' 10 @@ -39695,7 +39695,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010'; 0 + b'1010' 10 @@ -41766,7 +41766,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010'; 0 + b'1010' 10 @@ -44944,7 +44944,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010101010101010'; 0 + b'1010101010101010' 43690 @@ -45732,7 +45732,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010101010101010'; 0 + b'1010101010101010' 43690 @@ -46569,7 +46569,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010101010101010'; 0 + b'1010101010101010' 43690 @@ -47425,7 +47425,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010101010101010'; 0 + b'1010101010101010' 43690 @@ -48345,7 +48345,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010101010101010'; 0 + b'1010101010101010' 43690 @@ -49550,7 +49550,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010101010101010'; 0 + b'1010101010101010' 43690 @@ -50954,7 +50954,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010101010101010'; 0 + b'1010101010101010' 43690 @@ -53025,7 +53025,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'1010101010101010'; 0 + b'1010101010101010' 43690 @@ -56203,7 +56203,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'101010101010101010101010101010'; 0 + b'101010101010101010101010101010' 715827882 @@ -56993,7 +56993,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'101010101010101010101010101010'; 0 + b'101010101010101010101010101010' 715827882 @@ -57832,7 +57832,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'101010101010101010101010101010'; 0 + b'101010101010101010101010101010' 715827882 @@ -58690,7 +58690,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'101010101010101010101010101010'; 0 + b'101010101010101010101010101010' 715827882 @@ -59612,7 +59612,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'101010101010101010101010101010'; 0 + b'101010101010101010101010101010' 715827882 @@ -60819,7 +60819,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'101010101010101010101010101010'; 0 + b'101010101010101010101010101010' 715827882 @@ -62231,7 +62231,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'101010101010101010101010101010'; 0 + b'101010101010101010101010101010' 715827882 @@ -64304,7 +64304,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + b'101010101010101010101010101010'; 0 + b'101010101010101010101010101010' 715827882 @@ -67484,7 +67484,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<0); 0 + (1010101010101010101010101010101010101010101010101010101010101010<<0) 9223372036854775807 @@ -68271,7 +68271,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<1); 0 + (1010101010101010101010101010101010101010101010101010101010101010<<1) 18446744073709551614 @@ -69107,7 +69107,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<2); 0 + (1010101010101010101010101010101010101010101010101010101010101010<<2) 18446744073709551612 @@ -69962,7 +69962,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<4); 0 + (1010101010101010101010101010101010101010101010101010101010101010<<4) 18446744073709551600 @@ -70881,7 +70881,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<8); 0 + (1010101010101010101010101010101010101010101010101010101010101010<<8) 18446744073709551360 @@ -72085,7 +72085,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<16); 0 + (1010101010101010101010101010101010101010101010101010101010101010<<16) 18446744073709486080 @@ -73494,7 +73494,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<32); 0 + (1010101010101010101010101010101010101010101010101010101010101010<<32) 18446744069414584320 @@ -75570,7 +75570,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<64); 0 + (1010101010101010101010101010101010101010101010101010101010101010<<64) 0 @@ -78747,7 +78747,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<0); 0 + (10101010101010101010101010101010101010101010101010101010101010101<<0) 9223372036854775807 @@ -79534,7 +79534,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1); 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1) 18446744073709551614 @@ -80370,7 +80370,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<2); 0 + (10101010101010101010101010101010101010101010101010101010101010101<<2) 18446744073709551612 @@ -81225,7 +81225,7 @@ hex(c1) hex(c2) DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<4); 0 + (10101010101010101010101010101010101010101010101010101010101010101<<4) 18446744073709551600 @@ -82144,7 +82144,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<8); 0 + (10101010101010101010101010101010101010101010101010101010101010101<<8) 18446744073709551360 @@ -83348,7 +83348,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<16); 0 + (10101010101010101010101010101010101010101010101010101010101010101<<16) 18446744073709486080 @@ -84757,7 +84757,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<32); 0 + (10101010101010101010101010101010101010101010101010101010101010101<<32) 18446744069414584320 @@ -86833,7 +86833,7 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<64); 0 + (10101010101010101010101010101010101010101010101010101010101010101<<64) 0 @@ -90016,4 +90016,4 @@ A A DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' diff --git a/mysql-test/suite/engines/iuds/r/update_delete_number.result b/mysql-test/suite/engines/iuds/r/update_delete_number.result index 8e190870092..15de16ed714 100644 --- a/mysql-test/suite/engines/iuds/r/update_delete_number.result +++ b/mysql-test/suite/engines/iuds/r/update_delete_number.result @@ -740,7 +740,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; c1 c2 c3 c1 c2 c3 DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data CREATE TABLE t3(c1 INT UNSIGNED NOT NULL PRIMARY KEY, c2 INT SIGNED NULL, c3 INT); CREATE TABLE t4(c1 INT UNSIGNED, c2 INT); INSERT INTO t3 VALUES(200,126,1),(250,-127,2); @@ -980,9 +980,9 @@ drop table mt1, mt2, mt3; create table mt1 (col1 int); create table mt2 (col1 int); update mt1,mt2 set mt1.col1 = (select max(col1) from mt1) where mt1.col1 = mt2.col1; -ERROR HY000: You can't specify target table 'mt1' for update in FROM clause +ERROR HY000: Table 'mt1' is specified twice, both as a target for 'UPDATE' and as a separate source for data delete mt1 from mt1,mt2 where mt1.col1 < (select max(col1) from mt1) and mt1.col1 = mt2.col1; -ERROR HY000: You can't specify target table 'mt1' for update in FROM clause +ERROR HY000: Table 'mt1' is specified twice, both as a target for 'DELETE' and as a separate source for data drop table mt1,mt2; CREATE TABLE IF NOT EXISTS `mt1` (`id` int(11) NOT NULL auto_increment, `tst` text, `tsmt1` text, PRIMARY KEY (`id`)); CREATE TABLE IF NOT EXISTS `mt2` (`ID` int(11) NOT NULL auto_increment, `ParId` int(11) default NULL, `tst` text, `tsmt1` text, PRIMARY KEY (`ID`), KEY `IX_ParId_mt2` (`ParId`), FOREIGN KEY (`ParId`) REFERENCES `mt1` (`id`)); @@ -1853,7 +1853,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; c1 c2 c3 c1 c2 c3 DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data CREATE TABLE t3(c1 TINYINT UNSIGNED NOT NULL PRIMARY KEY, c2 TINYINT SIGNED NULL, c3 INT); CREATE TABLE t4(c1 TINYINT UNSIGNED, c2 INT); INSERT INTO t3 VALUES(200,126,1),(250,-127,2); @@ -2600,7 +2600,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; c1 c2 c3 c1 c2 c3 DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data CREATE TABLE t3(c1 SMALLINT UNSIGNED NOT NULL PRIMARY KEY, c2 SMALLINT SIGNED NULL, c3 INT); CREATE TABLE t4(c1 SMALLINT UNSIGNED, c2 INT); INSERT INTO t3 VALUES(200,126,1),(250,-127,2); @@ -3347,7 +3347,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; c1 c2 c3 c1 c2 c3 DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, c2 MEDIUMINT SIGNED NULL, c3 INT); CREATE TABLE t4(c1 MEDIUMINT UNSIGNED, c2 INT); INSERT INTO t3 VALUES(200,126,1),(250,-127,2); @@ -4077,7 +4077,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; c1 c2 c3 c1 c2 c3 DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data CREATE TABLE t3(c1 BIGINT UNSIGNED NOT NULL PRIMARY KEY, c2 BIGINT SIGNED NULL, c3 INT); CREATE TABLE t4(c1 BIGINT UNSIGNED, c2 INT); INSERT INTO t3 VALUES(200,126,1),(250,-127,2); diff --git a/mysql-test/suite/innodb/r/group_commit_crash.result b/mysql-test/suite/innodb/r/group_commit_crash.result index 005049df281..5d5dffab33e 100644 --- a/mysql-test/suite/innodb/r/group_commit_crash.result +++ b/mysql-test/suite/innodb/r/group_commit_crash.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); CREATE TABLE t1(a CHAR(255), b CHAR(255), c CHAR(255), diff --git a/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result b/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result index 846500ad2b1..542ce9d496e 100644 --- a/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result +++ b/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); CREATE TABLE t1(a CHAR(255), b CHAR(255), c CHAR(255), diff --git a/mysql-test/suite/innodb/r/innochecksum.result b/mysql-test/suite/innodb/r/innochecksum.result new file mode 100644 index 00000000000..c75e83e5ed7 --- /dev/null +++ b/mysql-test/suite/innodb/r/innochecksum.result @@ -0,0 +1,31 @@ +# Create and populate a table +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB; +INSERT INTO t1 (b) VALUES ('corrupt me'); +INSERT INTO t1 (b) VALUES ('corrupt me'); +CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) +ROW_FORMAT=COMPRESSED ENGINE=InnoDB ; +INSERT INTO t2(b) SELECT b from t1; +CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) +ROW_FORMAT=COMPRESSED ENGINE=InnoDB KEY_BLOCK_SIZE=16; +INSERT INTO t3(b) SELECT b from t1; +# Write file to make mysql-test-run.pl expect the "crash", but don't +# start it until it's told to +# We give 30 seconds to do a clean shutdown because we do not want +# to redo apply the pages of t1.ibd at the time of recovery. +# We want SQL to initiate the first access to t1.ibd. +# Wait until disconnected. +# Run innochecksum on t1 +InnoDB offline file checksum utility. +Table is uncompressed +Page size is 16384 +# Run innochecksum on t2 +InnoDB offline file checksum utility. +Table is compressed +Key block size is 8192 +# Run innochecksum on t3 +InnoDB offline file checksum utility. +Table is compressed +Key block size is 16384 +# Write file to make mysql-test-run.pl start up the server again +# Cleanup +DROP TABLE t1, t2, t3; diff --git a/mysql-test/suite/innodb/r/innodb-mdev7046.result b/mysql-test/suite/innodb/r/innodb-mdev7046.result new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-mdev7046.result @@ -0,0 +1 @@ +1 diff --git a/mysql-test/suite/innodb/r/innodb-stats-sample.result b/mysql-test/suite/innodb/r/innodb-stats-sample.result new file mode 100644 index 00000000000..a049a1d82c1 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-stats-sample.result @@ -0,0 +1,4 @@ +Variable_name Value +innodb_stats_sample_pages 1 +Variable_name Value +innodb_stats_traditional OFF diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result index a4e44be1c72..0e863f5849e 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result @@ -104,7 +104,7 @@ restore: t1 .ibd and .cfg files SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure"; SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -ERROR HY000: Got error 44 'Tablespace not found' from ./test_wl5522/t1.ibd +ERROR HY000: Got error 44 't1.ibd SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure"; restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; @@ -537,7 +537,7 @@ ERROR HY000: Tablespace has been discarded for table 't1' restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,fil_space_create_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -ERROR HY000: Got error 11 'Generic error' from ./test_wl5522/t1.ibd +ERROR HY000: Got error 11 't1.ibd SET SESSION debug_dbug="-d,fil_space_create_failure"; DROP TABLE test_wl5522.t1; unlink: t1.ibd @@ -550,7 +550,7 @@ ERROR HY000: Tablespace has been discarded for table 't1' restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -ERROR HY000: Got error 39 'Data structure corruption' from ./test_wl5522/t1.ibd +ERROR HY000: Got error 39 't1.ibd SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure"; DROP TABLE test_wl5522.t1; unlink: t1.ibd diff --git a/mysql-test/suite/innodb/r/innodb_bug12400341.result b/mysql-test/suite/innodb/r/innodb_bug12400341.result index 86eaa83980d..c382bd12616 100644 --- a/mysql-test/suite/innodb/r/innodb_bug12400341.result +++ b/mysql-test/suite/innodb/r/innodb_bug12400341.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too"); +call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too*"); set @old_innodb_undo_logs = @@innodb_undo_logs; set global innodb_undo_logs=1; show variables like "max_connections"; diff --git a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result index 8ec10a86b37..353303825e5 100644 --- a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result +++ b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result @@ -78,4 +78,5 @@ z 31 32 drop table corrupt_bit_test_Ä; +DROP DATABASE pad; SET GLOBAL innodb_change_buffering_debug = 0; diff --git a/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result b/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result index 47c714bb0a6..c351b222496 100644 --- a/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result +++ b/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result @@ -17,4 +17,16 @@ avg_row_length 0 max_data_length 0 index_length 0 ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats; +SELECT seq_in_index, column_name, cardinality +FROM information_schema.statistics WHERE table_name = 'test_ps_create_on_corrupted' +ORDER BY index_name, seq_in_index; +seq_in_index 1 +column_name a +cardinality 0 +SELECT table_rows, avg_row_length, max_data_length, index_length +FROM information_schema.tables WHERE table_name = 'test_ps_create_on_corrupted'; +table_rows 0 +avg_row_length 0 +max_data_length 0 +index_length 0 DROP TABLE test_ps_create_on_corrupted; diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result b/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result index 4d1b8817bf1..befbb709c19 100644 --- a/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result +++ b/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table*"); CREATE TABLE test_ps_fetch_nonexistent (a INT, PRIMARY KEY (a)) ENGINE=INNODB STATS_PERSISTENT=1; diff --git a/mysql-test/suite/innodb/r/insert_debug.result b/mysql-test/suite/innodb/r/insert_debug.result new file mode 100644 index 00000000000..0d176afa116 --- /dev/null +++ b/mysql-test/suite/innodb/r/insert_debug.result @@ -0,0 +1,11 @@ +# +# Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1 +# CAUSES INFINITE PAGE SPLIT +# +SET GLOBAL innodb_change_buffering_debug=1; +SET GLOBAL innodb_limit_optimistic_insert_debug=1; +CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB +PARTITION BY HASH (c1) PARTITIONS 15; +DROP TABLE t1; +SET GLOBAL innodb_change_buffering_debug=0; +SET GLOBAL innodb_limit_optimistic_insert_debug=0; diff --git a/mysql-test/suite/innodb/r/multi_repair-7404.result b/mysql-test/suite/innodb/r/multi_repair-7404.result new file mode 100644 index 00000000000..b3db5755b87 --- /dev/null +++ b/mysql-test/suite/innodb/r/multi_repair-7404.result @@ -0,0 +1,21 @@ +create table `t1`(`a` int) engine=innodb partition by key (`a`); +create table `t2`(`b` int) engine=innodb; +create table `t3`(`c` int) engine=innodb; +insert t1 values (1); +insert t2 values (2); +insert t3 values (3); +repair table `t1`,`t2`,`t3`; +Table Op Msg_type Msg_text +test.t1 repair status OK +test.t2 repair status OK +test.t3 repair status OK +select * from t1; +a +1 +select * from t2; +b +2 +select * from t3; +c +3 +drop table t1, t2, t3; diff --git a/mysql-test/suite/innodb/r/sp_temp_table.result b/mysql-test/suite/innodb/r/sp_temp_table.result new file mode 100644 index 00000000000..49a2a4aa831 --- /dev/null +++ b/mysql-test/suite/innodb/r/sp_temp_table.result @@ -0,0 +1,253 @@ +# +# Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE +# CALLED FROM A FUNCTION +# +call mtr.add_suppression("MySQL is trying to drop table"); +CREATE PROCEDURE cachedata( +IN obj_id BIGINT UNSIGNED, +IN start DATETIME, +IN end DATETIME +) +cachedata:BEGIN +DECLARE cache_count BIGINT; +SET @timestamp := NOW(); +CREATE TEMPORARY TABLE IF NOT EXISTS cachedata ( +timestamp DATETIME, +object_id BIGINT UNSIGNED NOT NULL, +start DATETIME, +end DATETIME, +seqno BIGINT AUTO_INCREMENT, +value FLOAT, +PRIMARY KEY (seqno), +INDEX (timestamp), +INDEX (object_id, start, end) +) ENGINE=INNODB; +DELETE FROM cachedata WHERE +timestamp < DATE_SUB(@timestamp, INTERVAL 15 SECOND); +SELECT count(*) INTO cache_count FROM cachedata WHERE +object_id = obj_id +AND start = start +AND end = end; +IF cache_count > 0 THEN LEAVE cachedata; +END IF; +INSERT INTO cachedata (timestamp, object_id, start, end, value) VALUES +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 2345), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 2345), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 2345); +END$$ +CREATE FUNCTION get_cache( +obj_id BIGINT UNSIGNED, +start DATETIME, +end DATETIME +) +RETURNS FLOAT +READS SQL DATA +BEGIN +DECLARE result FLOAT; +CALL cachedata(obj_id, start, end); +SELECT SUM(value) INTO result FROM cachedata WHERE +object_id = obj_id +AND start = start +AND end = end; +RETURN result; +END$$ +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +DROP FUNCTION get_cache; +DROP PROCEDURE cachedata; diff --git a/mysql-test/suite/innodb/r/strict_mode.result b/mysql-test/suite/innodb/r/strict_mode.result new file mode 100644 index 00000000000..d6a621212c3 --- /dev/null +++ b/mysql-test/suite/innodb/r/strict_mode.result @@ -0,0 +1,242 @@ +# +# Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN +# INNODB_STRICT_MODE = 1 +# +set innodb_strict_mode = 0; +create table t1 (id int auto_increment primary key, +v varchar(32), +col1 text, +col2 text, +col3 text, +col4 text, +col5 text, +col6 text, +col7 text, +col8 text, +col9 text, +col10 text, +col11 text, +col12 text, +col13 text, +col14 text, +col15 text, +col16 text, +col17 text, +col18 text, +col19 text, +col20 text, +col21 text, +col22 text, +col23 text, +col24 text, +col25 text, +col26 text, +col27 text, +col28 text, +col29 text, +col30 text, +col31 text, +col32 text, +col33 text, +col34 text, +col35 text, +col36 text, +col37 text, +col38 text, +col39 text, +col40 text, +col41 text, +col42 text, +col43 text, +col44 text, +col45 text , +col46 text, +col47 text, +col48 text, +col49 text, +col50 text, +col51 text, +col52 text, +col53 text, +col54 text, +col55 text, +col56 text, +col57 text, +col58 text, +col59 text, +col60 text, +col61 text, +col62 text, +col63 text, +col64 text, +col65 text, +col66 text, +col67 text, +col68 text , +col69 text, +col70 text, +col71 text, +col72 text, +col73 text, +col74 text, +col75 text, +col76 text, +col77 text, +col78 text, +col79 text, +col80 text, +col81 text, +col82 text, +col83 text, +col84 text, +col85 text, +col86 text, +col87 text, +col88 text, +col89 text, +col90 text, +col91 text, +col92 text, +col93 text, +col94 text, +col95 text, +col96 text, +col97 text, +col98 text, +col99 text, +col100 text, +col101 text, +col102 text, +col103 text, +col104 text, +col105 text, +col106 text, +col107 text, +col108 text, +col109 text, +col110 text, +col111 text, +col112 text, +col113 text, +col114 text, +col115 text, +col116 text, +col117 text, +col118 text, +col119 text, +col120 text, +col121 text, +col122 text, +col123 text, +col124 text, +col125 text, +col126 text , +col127 text, +col128 text, +col129 text, +col130 text, +col131 text, +col132 text, +col133 text, +col134 text, +col135 text, +col136 text, +col137 text, +col138 text, +col139 text, +col140 text, +col141 text, +col142 text, +col143 text, +col144 text, +col145 text, +col146 text, +col147 text , +col148 text, +col149 text, +col150 text, +col151 text, +col152 text, +col153 text, +col154 text, +col155 text, +col156 text, +col157 text, +col158 text, +col159 text, +col160 text, +col161 text, +col162 text, +col163 text, +col164 text, +col165 text, +col166 text, +col167 text, +col168 text, +col169 text, +col170 text, +col171 text, +col172 text , +col173 text, +col174 text, +col175 text, +col176 text, +col177 text, +col178 text, +col179 text, +col180 text, +col181 text, +col182 text, +col183 text, +col184 text, +col185 text, +col186 text, +col187 text, +col188 text, +col189 text, +col190 text, +col191 text, +col192 text, +col193 text, +col194 text, +col195 text, +col196 text, +col197 text, +col198 text, +col199 text, +col200 text, +col201 text, +col202 text, +col203 text, +col204 text, +col205 text, +col206 text, +col207 text, +col208 text, +col209 text, +col210 text, +col211 text, +col212 text, +col213 text, +col214 text, +col215 text, +col216 text, +col217 text, +col218 text, +col219 text, +col220 text, +col221 text, +col222 text, +col223 text, +col224 text, +col225 text, +col226 text, +col227 text, +col228 text +) ENGINE=InnoDB; +Warnings: +Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +set innodb_strict_mode = 1; +alter table t1 engine=InnoDB; +ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +drop table t1; diff --git a/mysql-test/suite/innodb/t/group_commit_crash.test b/mysql-test/suite/innodb/t/group_commit_crash.test index 7ad0d9d1e74..cad349819bd 100644 --- a/mysql-test/suite/innodb/t/group_commit_crash.test +++ b/mysql-test/suite/innodb/t/group_commit_crash.test @@ -9,6 +9,8 @@ --source include/have_debug.inc --source include/have_log_bin.inc +call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); + let $file_format_max=`SELECT @@innodb_file_format_max`; CREATE TABLE t1(a CHAR(255), b CHAR(255), diff --git a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test index 9dc2557e687..8d1f460b64b 100644 --- a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test +++ b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test @@ -9,6 +9,8 @@ --source include/have_debug.inc --source include/have_log_bin.inc +call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); + let $file_format_max=`SELECT @@innodb_file_format_max`; CREATE TABLE t1(a CHAR(255), b CHAR(255), diff --git a/mysql-test/suite/innodb/t/innochecksum.opt b/mysql-test/suite/innodb/t/innochecksum.opt new file mode 100644 index 00000000000..cc738d97434 --- /dev/null +++ b/mysql-test/suite/innodb/t/innochecksum.opt @@ -0,0 +1,2 @@ +--innodb_file_per_table=1 +--innodb_file_format=Barracuda diff --git a/mysql-test/suite/innodb/t/innochecksum.test b/mysql-test/suite/innodb/t/innochecksum.test new file mode 100644 index 00000000000..34df2801880 --- /dev/null +++ b/mysql-test/suite/innodb/t/innochecksum.test @@ -0,0 +1,70 @@ +# +# Test innochecksum +# + +# Don't test under embedded +source include/not_embedded.inc; +# Require InnoDB +source include/have_innodb.inc; + +if (!$INNOCHECKSUM) { + --echo Need innochecksum binary + --die Need innochecksum binary +} + +--echo # Create and populate a table +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB; +INSERT INTO t1 (b) VALUES ('corrupt me'); +--disable_query_log +--let $i = 1000 +while ($i) +{ + INSERT INTO t1 (b) VALUES (REPEAT('abcdefghijklmnopqrstuvwxyz', 100)); + dec $i; +} +--enable_query_log +INSERT INTO t1 (b) VALUES ('corrupt me'); + +CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) +ROW_FORMAT=COMPRESSED ENGINE=InnoDB ; + +INSERT INTO t2(b) SELECT b from t1; + +CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) +ROW_FORMAT=COMPRESSED ENGINE=InnoDB KEY_BLOCK_SIZE=16; + +INSERT INTO t3(b) SELECT b from t1; + +let $MYSQLD_DATADIR=`select @@datadir`; +let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd; +let t2_IBD = $MYSQLD_DATADIR/test/t2.ibd; +let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd; + +--echo # Write file to make mysql-test-run.pl expect the "crash", but don't +--echo # start it until it's told to +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +--echo # We give 30 seconds to do a clean shutdown because we do not want +--echo # to redo apply the pages of t1.ibd at the time of recovery. +--echo # We want SQL to initiate the first access to t1.ibd. +shutdown_server 30; + +--echo # Wait until disconnected. +--source include/wait_until_disconnected.inc + +--echo # Run innochecksum on t1 +--exec $INNOCHECKSUM $t1_IBD + +--echo # Run innochecksum on t2 +--exec $INNOCHECKSUM $t2_IBD + +--echo # Run innochecksum on t3 +--exec $INNOCHECKSUM $t3_IBD + +--echo # Write file to make mysql-test-run.pl start up the server again +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--enable_reconnect +--source include/wait_until_connected_again.inc + +--echo # Cleanup +DROP TABLE t1, t2, t3; diff --git a/mysql-test/suite/innodb/t/innodb-alter-table-disk-full.test b/mysql-test/suite/innodb/t/innodb-alter-table-disk-full.test index 4e3a7bfdae6..adeb2ef9fd2 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-table-disk-full.test +++ b/mysql-test/suite/innodb/t/innodb-alter-table-disk-full.test @@ -1,5 +1,8 @@ # MDEV-6288: Innodb causes server crash after disk full, then can't ALTER TABLE any more --source include/have_innodb.inc +--source include/not_windows.inc +--source include/not_valgrind.inc +--source include/not_embedded.inc # DEBUG_SYNC must be compiled in. --source include/have_debug_sync.inc diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test index 1774bb7f796..8cbe4938cab 100644 --- a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test +++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test @@ -14,6 +14,8 @@ if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where --source include/not_embedded.inc # DBUG_SUICIDE() hangs under valgrind --source include/not_valgrind.inc +# No windows, need perl +--source include/not_windows.inc # The flag innodb_change_buffering_debug is only available in debug builds. # It instructs InnoDB to try to evict pages from the buffer pool when diff --git a/mysql-test/suite/innodb/t/innodb-mdev7046.test b/mysql-test/suite/innodb/t/innodb-mdev7046.test new file mode 100644 index 00000000000..4033f284e65 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-mdev7046.test @@ -0,0 +1,48 @@ +--source include/have_innodb.inc +--source include/have_partition.inc + +--disable_query_log +--disable_result_log +--disable_warnings + + +# Ignore OS errors +call mtr.add_suppression("InnoDB: File ./test/t1*"); +call mtr.add_suppression("InnoDB: Error number*"); +call mtr.add_suppression("InnoDB: File ./test/t1#p#p1#sp#p1sp0.ibd: 'rename' returned OS error*"); + +# MDEV-7046: MySQL#74480 - Failing assertion: os_file_status(newpath, &exists, &type) +# after Operating system error number 36 in a file operation + +USE test; +create table t1(f1 INT,f2 INT,f3 CHAR (10),primary key(f1,f2)) partition by range(f1) subpartition by hash(f2) subpartitions 2 (partition p1 values less than (0),partition p2 values less than (2),partition p3 values less than (2147483647)); +--replace_regex /'.*t2_new.*'/'t2_new'/ +--error 7 +RENAME TABLE t1 TO `t2_new..............................................end`; +alter table t1 engine=innodb; +--replace_regex /'.*t2_new.*'/'t2_new'/ +--error 1025 +RENAME TABLE t1 TO `t2_new..............................................end`; +--replace_regex /'.*t2_new.*'/'t2_new'/ +show warnings; +drop table t1; + +DROP DATABASE test;CREATE DATABASE test;USE test; +SET @@session.storage_engine=MYISAM; +--error 0,1,1103 +CREATE TABLE t1(id INT,purchased DATE)PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2 (PARTITION p0 VALUES LESS THAN MAXVALUE (SUBPARTITION sp0 DATA DIRECTORY='/tmp/not-existing' INDEX DIRECTORY='/tmp/not-existing',SUBPARTITION sp1)); +drop table if exists t1; +CREATE TABLE t1(id INT,purchased DATE)PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2 (PARTITION p0 VALUES LESS THAN MAXVALUE (SUBPARTITION sp0,SUBPARTITION sp1)); +ALTER TABLE t1 ENGINE=InnoDB; + +drop table t1; + +let $datadir=`select @@datadir`; +--remove_file $datadir/test/db.opt + +--enable_query_log +--enable_result_log +--enable_warnings + +# make sure that we have at least some ouput to avoid mtr warning +--echo 1 diff --git a/mysql-test/suite/innodb/t/innodb-stats-sample.test b/mysql-test/suite/innodb/t/innodb-stats-sample.test new file mode 100644 index 00000000000..35d35bfa382 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-stats-sample.test @@ -0,0 +1,78 @@ +--source include/have_innodb.inc +# +# Test that mysqld does not crash when running ANALYZE TABLE with +# different values of the parameter innodb_stats_sample_pages. +# + +# we care only that the following SQL commands do not produce errors +# and do not crash the server +-- disable_query_log +-- disable_result_log +-- enable_warnings + +let $sample_pages=`select @@innodb_stats_sample_pages`; +let $traditional=`select @@innodb_stats_traditional`; +SET GLOBAL innodb_stats_sample_pages=0; +#use new method to calculate statistics +SET GLOBAL innodb_stats_traditional=0; + +# check that the value has been adjusted to 1 +-- enable_result_log +SHOW VARIABLES LIKE 'innodb_stats_sample_pages'; +SHOW VARIABLES LIKE 'innodb_stats_traditional'; +-- disable_result_log + +CREATE TABLE innodb_analyze ( + a INT, + b INT, + c char(50), + KEY(a), + KEY(b,a) +) ENGINE=InnoDB; + +# test with empty table +ANALYZE TABLE innodb_analyze; + +SET GLOBAL innodb_stats_sample_pages=2; +ANALYZE TABLE innodb_analyze; + +SET GLOBAL innodb_stats_sample_pages=1; +ANALYZE TABLE innodb_analyze; + +SET GLOBAL innodb_stats_sample_pages=8000; +ANALYZE TABLE innodb_analyze; + +delimiter //; +create procedure innodb_insert_proc (repeat_count int) +begin + declare current_num int; + set current_num = 0; + while current_num < repeat_count do + insert into innodb_analyze values(current_num, current_num*100,substring(MD5(RAND()), -44)); + set current_num = current_num + 1; + end while; +end// +delimiter ;// +commit; + +set autocommit=0; +call innodb_insert_proc(7000); +commit; +set autocommit=1; + +SET GLOBAL innodb_stats_sample_pages=1; +ANALYZE TABLE innodb_analyze; + +SET GLOBAL innodb_stats_sample_pages=8; +ANALYZE TABLE innodb_analyze; + +SET GLOBAL innodb_stats_sample_pages=16; +ANALYZE TABLE innodb_analyze; + +SET GLOBAL innodb_stats_sample_pages=8000; +ANALYZE TABLE innodb_analyze; + +DROP PROCEDURE innodb_insert_proc; +DROP TABLE innodb_analyze; +EVAL SET GLOBAL innodb_stats_sample_pages=$sample_pages; +EVAL SET GLOBAL innodb_stats_traditional=$traditional;
\ No newline at end of file diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test index 1290b9b5bb7..4b03ac008d2 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test @@ -22,7 +22,7 @@ let MYSQLD_DATADIR =`SELECT @@datadir`; let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; let $innodb_file_format = `SELECT @@innodb_file_format`; let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; -let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522\\t1.ibd'/; +let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522_t1.ibd'/; SET GLOBAL innodb_file_per_table = 1; SELECT @@innodb_file_per_table; @@ -233,8 +233,7 @@ SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure"; # Test failure after attempting a tablespace open SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; ---replace_regex /file: '.*t1.ibd'/'t1.ibd'/ - +--replace_regex /'.*[\/\\]/'/ --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; @@ -637,8 +636,7 @@ EOF SET SESSION debug_dbug="+d,fil_space_create_failure"; ---replace_regex $pathfix - +--replace_regex /'.*[\/\\]/'/ --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; @@ -669,8 +667,7 @@ EOF SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; ---replace_regex $pathfix - +--replace_regex /'.*[\/\\]/'/ --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341.test b/mysql-test/suite/innodb/t/innodb_bug12400341.test index 173d42665be..165e19b7cbc 100644 --- a/mysql-test/suite/innodb/t/innodb_bug12400341.test +++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test @@ -10,8 +10,13 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n # Don't test under valgrind, undo slots of the previous test might exist still # and cause unstable result. --source include/not_valgrind.inc +# undo slots of the previous test might exist still +--source include/not_windows.inc -call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too"); +# Previous undo slots cause unnecessary failures +--source include/not_windows.inc + +call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too*"); --disable_query_log set @old_innodb_trx_rseg_n_slots_debug = @@innodb_trx_rseg_n_slots_debug; diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test index 050f7fbdd73..6f0bfca8e1d 100644 --- a/mysql-test/suite/innodb/t/innodb_bug14147491.test +++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test @@ -12,6 +12,9 @@ source include/not_embedded.inc; source include/have_innodb.inc; # Require Debug for SET DEBUG source include/have_debug.inc; +# Test could open crash reporter on Windows +# if compiler set up +source include/not_windows.inc; CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test index c57e52b65cc..12c560934ef 100644 --- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test +++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test @@ -4,6 +4,11 @@ -- source include/have_innodb.inc -- source include/have_innodb_16k.inc +if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier +} + # Issues with innodb_change_buffering_debug on Windows, so the test scenario # cannot be created on windows --source include/not_windows.inc @@ -18,14 +23,20 @@ call mtr.add_suppression("Flagged corruption of idx.*in CHECK TABLE"); # It instructs InnoDB to try to evict pages from the buffer pool when # change buffering is possible, so that the change buffer will be used # whenever possible. --- error 0,ER_UNKNOWN_SYSTEM_VARIABLE SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; --- error 0,ER_UNKNOWN_SYSTEM_VARIABLE SET GLOBAL innodb_change_buffering_debug = 1; # Turn off Unique Check to create corrupted index with dup key SET UNIQUE_CHECKS=0; +CREATE DATABASE pad; +let $i=345; +while ($i) +{ + --eval CREATE TABLE pad.t$i (a INT PRIMARY KEY) ENGINE=InnoDB; + dec $i; +} + -- enable_query_log set names utf8; @@ -121,6 +132,6 @@ select z from corrupt_bit_test_Ä limit 10; # Drop table drop table corrupt_bit_test_Ä; +DROP DATABASE pad; --- error 0, ER_UNKNOWN_SYSTEM_VARIABLE SET GLOBAL innodb_change_buffering_debug = 0; diff --git a/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test b/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test index 78c9334f800..de6026a23aa 100644 --- a/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test +++ b/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test @@ -33,4 +33,16 @@ FROM information_schema.tables WHERE table_name = 'test_ps_create_on_corrupted'; # restore the persistent storage ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats; +--source include/restart_mysqld.inc + +-- vertical_results + +# check again +SELECT seq_in_index, column_name, cardinality +FROM information_schema.statistics WHERE table_name = 'test_ps_create_on_corrupted' +ORDER BY index_name, seq_in_index; + +SELECT table_rows, avg_row_length, max_data_length, index_length +FROM information_schema.tables WHERE table_name = 'test_ps_create_on_corrupted'; + DROP TABLE test_ps_create_on_corrupted; diff --git a/mysql-test/suite/innodb/t/innodb_stats_fetch_nonexistent.test b/mysql-test/suite/innodb/t/innodb_stats_fetch_nonexistent.test index 6c7365c52d1..dbafb33965c 100644 --- a/mysql-test/suite/innodb/t/innodb_stats_fetch_nonexistent.test +++ b/mysql-test/suite/innodb/t/innodb_stats_fetch_nonexistent.test @@ -4,6 +4,8 @@ -- source include/have_innodb.inc +call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table*"); + -- vertical_results CREATE TABLE test_ps_fetch_nonexistent diff --git a/mysql-test/suite/innodb/t/insert_debug.test b/mysql-test/suite/innodb/t/insert_debug.test new file mode 100644 index 00000000000..666b634bef9 --- /dev/null +++ b/mysql-test/suite/innodb/t/insert_debug.test @@ -0,0 +1,22 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_partition.inc + +if (`select plugin_auth_version < "5.6.22" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in InnoDB/XtraDB as of 5.6.21 or earlier +} + +--echo # +--echo # Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1 +--echo # CAUSES INFINITE PAGE SPLIT +--echo # + +SET GLOBAL innodb_change_buffering_debug=1; +SET GLOBAL innodb_limit_optimistic_insert_debug=1; +CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB +PARTITION BY HASH (c1) PARTITIONS 15; +DROP TABLE t1; + +SET GLOBAL innodb_change_buffering_debug=0; +SET GLOBAL innodb_limit_optimistic_insert_debug=0; diff --git a/mysql-test/suite/innodb/t/multi_repair-7404.test b/mysql-test/suite/innodb/t/multi_repair-7404.test new file mode 100644 index 00000000000..0775cd8b200 --- /dev/null +++ b/mysql-test/suite/innodb/t/multi_repair-7404.test @@ -0,0 +1,18 @@ +# +# MDEV-7404 REPAIR multiple tables crash in MDL_ticket::has_stronger_or_equal_type +# + +--source include/have_partition.inc +--source include/have_innodb.inc +create table `t1`(`a` int) engine=innodb partition by key (`a`); +create table `t2`(`b` int) engine=innodb; +create table `t3`(`c` int) engine=innodb; +insert t1 values (1); +insert t2 values (2); +insert t3 values (3); +repair table `t1`,`t2`,`t3`; +select * from t1; +select * from t2; +select * from t3; +drop table t1, t2, t3; + diff --git a/mysql-test/suite/innodb/t/sp_temp_table.test b/mysql-test/suite/innodb/t/sp_temp_table.test new file mode 100644 index 00000000000..9a6be85fd7e --- /dev/null +++ b/mysql-test/suite/innodb/t/sp_temp_table.test @@ -0,0 +1,108 @@ +--source include/have_innodb.inc +--source include/big_test.inc + +if (`select plugin_auth_version < "5.6.22" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in InnoDB/XtraDB as of 5.6.21 or earlier +} + +--echo # +--echo # Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE +--echo # CALLED FROM A FUNCTION +--echo # + +call mtr.add_suppression("MySQL is trying to drop table"); + +DELIMITER $$; +CREATE PROCEDURE cachedata( + IN obj_id BIGINT UNSIGNED, + IN start DATETIME, + IN end DATETIME +) + +cachedata:BEGIN + DECLARE cache_count BIGINT; + + SET @timestamp := NOW(); + + CREATE TEMPORARY TABLE IF NOT EXISTS cachedata ( + timestamp DATETIME, + object_id BIGINT UNSIGNED NOT NULL, + start DATETIME, + end DATETIME, + seqno BIGINT AUTO_INCREMENT, + value FLOAT, + PRIMARY KEY (seqno), + INDEX (timestamp), + INDEX (object_id, start, end) + ) ENGINE=INNODB; + + DELETE FROM cachedata WHERE + timestamp < DATE_SUB(@timestamp, INTERVAL 15 SECOND); + + SELECT count(*) INTO cache_count FROM cachedata WHERE + object_id = obj_id + AND start = start + AND end = end; + + IF cache_count > 0 THEN LEAVE cachedata; + END IF; + + INSERT INTO cachedata (timestamp, object_id, start, end, value) VALUES + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 2345), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 2345), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 2345); + +END$$ + + +CREATE FUNCTION get_cache( + obj_id BIGINT UNSIGNED, + start DATETIME, + end DATETIME +) + RETURNS FLOAT + READS SQL DATA +BEGIN + DECLARE result FLOAT; + + CALL cachedata(obj_id, start, end); + + SELECT SUM(value) INTO result FROM cachedata WHERE + object_id = obj_id + AND start = start + AND end = end; + + RETURN result; +END$$ + +DELIMITER ;$$ + +let $i = 30; +while ($i) +{ + SELECT get_cache(1, '2014-01-01', '2014-02-01'); + select sleep(1); + dec $i; +} + +DROP FUNCTION get_cache; +DROP PROCEDURE cachedata; diff --git a/mysql-test/suite/innodb/t/strict_mode.test b/mysql-test/suite/innodb/t/strict_mode.test new file mode 100644 index 00000000000..9b115091f84 --- /dev/null +++ b/mysql-test/suite/innodb/t/strict_mode.test @@ -0,0 +1,251 @@ +--source include/have_innodb.inc + +if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier +} + +--echo # +--echo # Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN +--echo # INNODB_STRICT_MODE = 1 +--echo # + +set innodb_strict_mode = 0; + +create table t1 (id int auto_increment primary key, +v varchar(32), +col1 text, +col2 text, +col3 text, +col4 text, +col5 text, +col6 text, +col7 text, +col8 text, +col9 text, +col10 text, +col11 text, +col12 text, +col13 text, +col14 text, +col15 text, +col16 text, +col17 text, +col18 text, +col19 text, +col20 text, +col21 text, +col22 text, +col23 text, +col24 text, +col25 text, +col26 text, +col27 text, +col28 text, +col29 text, +col30 text, +col31 text, +col32 text, +col33 text, +col34 text, +col35 text, +col36 text, +col37 text, +col38 text, +col39 text, +col40 text, +col41 text, +col42 text, +col43 text, +col44 text, +col45 text , +col46 text, +col47 text, +col48 text, +col49 text, +col50 text, +col51 text, +col52 text, +col53 text, +col54 text, +col55 text, +col56 text, +col57 text, +col58 text, +col59 text, +col60 text, +col61 text, +col62 text, +col63 text, +col64 text, +col65 text, +col66 text, +col67 text, +col68 text , +col69 text, +col70 text, +col71 text, +col72 text, +col73 text, +col74 text, +col75 text, +col76 text, +col77 text, +col78 text, +col79 text, +col80 text, +col81 text, +col82 text, +col83 text, +col84 text, +col85 text, +col86 text, +col87 text, +col88 text, +col89 text, +col90 text, +col91 text, +col92 text, +col93 text, +col94 text, +col95 text, +col96 text, +col97 text, +col98 text, +col99 text, +col100 text, +col101 text, +col102 text, +col103 text, +col104 text, +col105 text, +col106 text, +col107 text, +col108 text, +col109 text, +col110 text, +col111 text, +col112 text, +col113 text, +col114 text, +col115 text, +col116 text, +col117 text, +col118 text, +col119 text, +col120 text, +col121 text, +col122 text, +col123 text, +col124 text, +col125 text, +col126 text , +col127 text, +col128 text, +col129 text, +col130 text, +col131 text, +col132 text, +col133 text, +col134 text, +col135 text, +col136 text, +col137 text, +col138 text, +col139 text, +col140 text, +col141 text, +col142 text, +col143 text, +col144 text, +col145 text, +col146 text, +col147 text , +col148 text, +col149 text, +col150 text, +col151 text, +col152 text, +col153 text, +col154 text, +col155 text, +col156 text, +col157 text, +col158 text, +col159 text, +col160 text, +col161 text, +col162 text, +col163 text, +col164 text, +col165 text, +col166 text, +col167 text, +col168 text, +col169 text, +col170 text, +col171 text, +col172 text , +col173 text, +col174 text, +col175 text, +col176 text, +col177 text, +col178 text, +col179 text, +col180 text, +col181 text, +col182 text, +col183 text, +col184 text, +col185 text, +col186 text, +col187 text, +col188 text, +col189 text, +col190 text, +col191 text, +col192 text, +col193 text, +col194 text, +col195 text, +col196 text, +col197 text, +col198 text, +col199 text, +col200 text, +col201 text, +col202 text, +col203 text, +col204 text, +col205 text, +col206 text, +col207 text, +col208 text, +col209 text, +col210 text, +col211 text, +col212 text, +col213 text, +col214 text, +col215 text, +col216 text, +col217 text, +col218 text, +col219 text, +col220 text, +col221 text, +col222 text, +col223 text, +col224 text, +col225 text, +col226 text, +col227 text, +col228 text +) ENGINE=InnoDB; + +set innodb_strict_mode = 1; +--error ER_TOO_BIG_ROWSIZE +alter table t1 engine=InnoDB; + +drop table t1; diff --git a/mysql-test/suite/maria/insert_select-7314.result b/mysql-test/suite/maria/insert_select-7314.result new file mode 100644 index 00000000000..2f25cc5855c --- /dev/null +++ b/mysql-test/suite/maria/insert_select-7314.result @@ -0,0 +1,17 @@ +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' +# +# MDEV-7314 +# Concurrent "INSERT INTO table SELECT MAX(id)+1 FROM table" are +# hitting deadlocks on Aria tables using ROW_FORMAT=PAGE +# +create table t1 (pk int primary key) engine=Aria; +insert into t1 values (1); +insert into t1 select sleep(2)+1 from t1; +insert into t1 select 2 from t1; +select * from t1; +pk +1 +2 +drop table t1; diff --git a/mysql-test/suite/maria/insert_select-7314.test b/mysql-test/suite/maria/insert_select-7314.test new file mode 100644 index 00000000000..f5869edd4ce --- /dev/null +++ b/mysql-test/suite/maria/insert_select-7314.test @@ -0,0 +1,27 @@ +-- source include/have_maria.inc +--source include/have_binlog_format_statement.inc + +drop table if exists t1; + +--echo # +--echo # MDEV-7314 +--echo # Concurrent "INSERT INTO table SELECT MAX(id)+1 FROM table" are +--echo # hitting deadlocks on Aria tables using ROW_FORMAT=PAGE +--echo # + +create table t1 (pk int primary key) engine=Aria; +insert into t1 values (1); + +send insert into t1 select sleep(2)+1 from t1; + +--connect (con1,localhost,root,,) + +--error 0,1062 +insert into t1 select 2 from t1; + +--connection default +--error 0,1062 +--reap + +select * from t1; +drop table t1; diff --git a/mysql-test/suite/maria/insert_select.result b/mysql-test/suite/maria/insert_select.result new file mode 100644 index 00000000000..878914ddabf --- /dev/null +++ b/mysql-test/suite/maria/insert_select.result @@ -0,0 +1,6 @@ +create table t1 (pk int primary key) engine=Aria; +insert into t1 values (1); +insert into t1 select sleep(2)+1 from t1; +insert into t1 select 2 from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +drop table t1; diff --git a/mysql-test/suite/maria/insert_select.test b/mysql-test/suite/maria/insert_select.test new file mode 100644 index 00000000000..a86edc7d857 --- /dev/null +++ b/mysql-test/suite/maria/insert_select.test @@ -0,0 +1,21 @@ +# +# MDEV-4010 +# Deadlock on concurrent INSERT .. SELECT into an Aria table with statement +# binary logging +# +--source include/have_binlog_format_statement.inc + +create table t1 (pk int primary key) engine=Aria; +insert into t1 values (1); + +send insert into t1 select sleep(2)+1 from t1; + +--connect (con1,localhost,root,,) + +insert into t1 select 2 from t1; + +--connection default +--error 1062 +--reap +--disconnect con1 +drop table t1; diff --git a/mysql-test/suite/multi_source/gtid.result b/mysql-test/suite/multi_source/gtid.result index ce926ddc995..28ac1e7429e 100644 --- a/mysql-test/suite/multi_source/gtid.result +++ b/mysql-test/suite/multi_source/gtid.result @@ -26,59 +26,6 @@ SET SQL_LOG_BIN=0; CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)); SET SQL_LOG_BIN=1; INSERT INTO t3 VALUES (201, "initial 2"); -SHOW ALL SLAVES STATUS; -Connection_name -Slave_SQL_State Slave has read all relay log; waiting for the slave I/O thread to update it -Slave_IO_State Waiting for master to send event -Master_Host 127.0.0.1 -Master_User root -Master_Port MYPORT_3 -Connect_Retry 60 -Master_Log_File server3-bin.000001 -Read_Master_Log_Pos 1501 -Relay_Log_File mysqld-relay-bin.000002 -Relay_Log_Pos 1790 -Relay_Master_Log_File server3-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 1501 -Relay_Log_Space 2088 -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master 0 -Master_SSL_Verify_Server_Cert No -Last_IO_Errno 0 -Last_IO_Error -Last_SQL_Errno 0 -Last_SQL_Error -Replicate_Ignore_Server_Ids -Master_Server_Id 3 -Master_SSL_Crl -Master_SSL_Crlpath -Using_Gtid No -Gtid_IO_Pos -Retried_transactions 0 -Max_relay_log_size 1073741824 -Executed_log_entries 25 -Slave_received_heartbeats 0 -Slave_heartbeat_period 60.000 -Gtid_Slave_Pos 1-1-4,2-2-3 *** Now move slave2 to replicate from both master1 and master2 instead of just slave1 *** STOP ALL SLAVES; Warnings: @@ -102,9 +49,11 @@ INSERT INTO t1 VALUES (3, "switch 2"); INSERT INTO t3 VALUES (103, "switch 2 a"); INSERT INTO t2 VALUES (3, "switch 2"); INSERT INTO t3 VALUES (203, "switch 2 b"); +include/save_master_gtid.inc STOP SLAVE 'slave2'; INSERT INTO t2 VALUES (4, "switch 3"); INSERT INTO t3 VALUES (204, "switch 3 b"); +include/sync_with_master_gtid.inc CHANGE MASTER TO master_port=MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos; START SLAVE; SELECT * FROM t1 ORDER BY a; diff --git a/mysql-test/suite/multi_source/gtid.test b/mysql-test/suite/multi_source/gtid.test index 7a085823693..bebee66068f 100644 --- a/mysql-test/suite/multi_source/gtid.test +++ b/mysql-test/suite/multi_source/gtid.test @@ -58,8 +58,6 @@ INSERT INTO t3 VALUES (201, "initial 2"); --source include/wait_condition.inc --let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=1 AND (SELECT COUNT(*) FROM t2)=1 AND (SELECT COUNT(*) FROM t3)=2 --source include/wait_condition.inc ---replace_result $SERVER_MYPORT_3 MYPORT_3 -query_vertical SHOW ALL SLAVES STATUS; --echo *** Now move slave2 to replicate from both master1 and master2 instead of just slave1 *** STOP ALL SLAVES; @@ -93,6 +91,8 @@ set default_master_connection = ''; --connection slave1 # Set up so that slave1 will have to start from two different positions # in the slave2 binlog (one for each domain_id). +--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=2 AND (SELECT COUNT(*) FROM t2)=2 AND (SELECT COUNT(*) FROM t3)=4 +--source include/wait_condition.inc STOP SLAVE 'slave1'; --connection master1 @@ -106,6 +106,7 @@ INSERT INTO t3 VALUES (103, "switch 2 a"); --connection master2 INSERT INTO t2 VALUES (3, "switch 2"); INSERT INTO t3 VALUES (203, "switch 2 b"); +--source include/save_master_gtid.inc --connection slave1 --let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=2 AND (SELECT COUNT(*) FROM t2)=3 AND (SELECT COUNT(*) FROM t3)=5 @@ -116,6 +117,12 @@ STOP SLAVE 'slave2'; INSERT INTO t2 VALUES (4, "switch 3"); INSERT INTO t3 VALUES (204, "switch 3 b"); +--connection slave2 +# Make sure that slave2 has replicated far enough before connecting slave1 to +# it (otherwise we get an error that slave1 requested to start from a GTID +# which is not in slave2's binlogs). +--source include/sync_with_master_gtid.inc + --connection slave1 --replace_result $SERVER_MYPORT_4 MYPORT_4 eval CHANGE MASTER TO master_port=$SERVER_MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos; diff --git a/mysql-test/suite/perfschema/r/unary_digest.result b/mysql-test/suite/perfschema/r/unary_digest.result new file mode 100644 index 00000000000..40fcc026fad --- /dev/null +++ b/mysql-test/suite/perfschema/r/unary_digest.result @@ -0,0 +1,47 @@ +TRUNCATE TABLE performance_schema.events_statements_summary_by_digest; +ERROR 42S02: Table 'test.expect_unary' doesn't exist +ERROR 42S02: Table 'test.expect_unary' doesn't exist +ERROR 42S02: Table 'test.expect_unary' doesn't exist +ERROR 42S02: Table 'test.expect_unary' doesn't exist +ERROR 42S02: Table 'test.expect_unary' doesn't exist +ERROR 42S02: Table 'test.expect_binary' doesn't exist +ERROR 42S02: Table 'test.expect_binary' doesn't exist +ERROR 42S02: Table 'test.expect_binary' doesn't exist +ERROR 42S02: Table 'test.expect_binary' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist +ERROR 42S02: Table 'test.expect_unchanged' doesn't exist +SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR +FROM performance_schema.events_statements_summary_by_digest; +SCHEMA_NAME DIGEST_TEXT COUNT_STAR +test TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 +test SELECT ? FROM expect_unary 5 +test SELECT ? + ? FROM expect_binary 2 +test SELECT ? - ? FROM expect_binary 2 +test INSERT INTO expect_full_reduce VALUES (...) 27 +test SELECT a - b , a + b , - a , - b , + a , + b FROM expect_unchanged 1 diff --git a/mysql-test/suite/perfschema/t/setup_instruments_defaults.test b/mysql-test/suite/perfschema/t/setup_instruments_defaults.test index 5fd5acceb34..e1f61404d12 100644 --- a/mysql-test/suite/perfschema/t/setup_instruments_defaults.test +++ b/mysql-test/suite/perfschema/t/setup_instruments_defaults.test @@ -60,6 +60,8 @@ WHERE name like "%wait/io/table/sql/handler%"; --echo # --echo # Stop server --send_shutdown +--source include/wait_until_disconnected.inc + --echo # Restart server with wait/io/table/sql/handler disabled --exec echo "restart:--loose-performance-schema-instrument=%wait/io/table/sql/%=off" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect diff --git a/mysql-test/suite/perfschema/t/unary_digest.test b/mysql-test/suite/perfschema/t/unary_digest.test new file mode 100644 index 00000000000..c4583484f36 --- /dev/null +++ b/mysql-test/suite/perfschema/t/unary_digest.test @@ -0,0 +1,98 @@ +# ---------------------------------------------------- +# Tests for the performance schema statement Digests. +# ---------------------------------------------------- + +# Test case to show behavior of statements digest when +# statement-digest-size is 0 + +--source include/not_embedded.inc +--source include/have_perfschema.inc +--source ../include/no_protocol.inc + +TRUNCATE TABLE performance_schema.events_statements_summary_by_digest; + +--disable_query_log + +--error ER_NO_SUCH_TABLE +select 1 from expect_unary; +--error ER_NO_SUCH_TABLE +select +1 from expect_unary; +--error ER_NO_SUCH_TABLE +select -1 from expect_unary; +--error ER_NO_SUCH_TABLE +select ++++++++++++++++++++++++++++++++++++++++++++++++1 from expect_unary; +--error ER_NO_SUCH_TABLE +select ------------------------------------------------1 from expect_unary; + +--error ER_NO_SUCH_TABLE +select 0+1 from expect_binary; +--error ER_NO_SUCH_TABLE +select 0-1 from expect_binary; +--error ER_NO_SUCH_TABLE +select 0 ++++++++++++++++++++++++++++++++++++++++++++++++1 from expect_binary; +--error ER_NO_SUCH_TABLE +select 0 ------------------------------------------------1 from expect_binary; + +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, 0, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, 0, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, 0, +1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, -1, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, -1, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, -1, +1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, +1, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, +1, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (0, +1, +1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, 0, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, 0, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, 0, +1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, -1, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, -1, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, -1, +1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, +1, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, +1, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (-1, +1, +1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, 0, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, 0, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, 0, +1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, -1, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, -1, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, -1, +1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, +1, 0); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, +1, -1); +--error ER_NO_SUCH_TABLE +insert into expect_full_reduce values (+1, +1, +1); + +--error ER_NO_SUCH_TABLE +select a-b, a+b, -a, -b, +a, +b from expect_unchanged; + +--enable_query_log + +SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR + FROM performance_schema.events_statements_summary_by_digest; + diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test index f63c8022392..869fd944d51 100644 --- a/mysql-test/suite/plugins/t/server_audit.test +++ b/mysql-test/suite/plugins/t/server_audit.test @@ -43,6 +43,7 @@ show variables like 'server_audit%'; set global server_audit_mode=1; set global server_audit_events=''; create database sa_db; +--sleep 2 connect (con1,localhost,root,,test); connection con1; create table t1 (id2 int); diff --git a/mysql-test/suite/rpl/r/myisam_external_lock.result b/mysql-test/suite/rpl/r/myisam_external_lock.result new file mode 100644 index 00000000000..ef24f8b4e3c --- /dev/null +++ b/mysql-test/suite/rpl/r/myisam_external_lock.result @@ -0,0 +1,12 @@ +include/master-slave.inc +[connection master] +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' +CREATE TABLE `t1` (`col1` int(11) NOT NULL,`col2` int(11) NOT NULL, +PRIMARY KEY (`col1`,`col2`), +KEY `col2` (`col2`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO `t1` VALUES (2775,974),(2775,975),(2775,976),(2778,977),(2778,978),(2782,979),(2790,986),(2790,1139),(2792,840),(2792,984),(2792,989),(2793,982),(2793,992),(2793,993),(2793,994),(2795,323),(2795,332),(2797,980),(2797,997),(2797,998),(2798,1103),(2798,1104),(2799,841),(2799,985),(2799,988),(2833,983),(2833,990),(2833,991),(2834,981),(2834,995),(2834,996),(2835,316),(2835,317),(3007,854),(3007,856),(3008,855),(3008,857),(3009,823),(3009,824),(3014,1),(3015,1),(3016,2),(3017,2),(3018,3),(3019,3),(3024,842),(3024,843),(3024,844),(3025,845),(3025,846),(3025,847),(3040,31),(3041,32),(3042,52),(3042,55),(3043,53),(3043,54),(3044,278),(3044,279),(3044,280),(3044,281),(3044,282),(3044,283),(3044,284),(3044,285),(3045,1),(3046,1),(3049,220),(3050,221),(3050,222),(3051,2),(3052,2),(3053,223),(3054,224),(3055,225),(3056,226),(3057,227),(3058,228),(3059,229),(3060,327),(3066,236),(3067,237),(3068,238),(3069,239),(3070,240),(3080,241),(3081,242),(3082,247),(3083,248),(3084,249),(3085,250),(3086,251),(3087,252),(3088,253),(3089,254),(3090,255),(3091,256),(3092,257),(3093,258),(3094,259),(3096,263),(3097,264),(3100,273),(3100,302),(3101,266),(3102,267),(3103,268),(3104,269),(3105,270),(3111,275),(3112,238),(3113,272),(3115,286),(3116,318),(3116,319),(3117,290),(3117,292),(3118,238),(3119,291),(3119,293),(3120,304),(3121,305),(3122,306),(3123,307),(3124,308),(3125,309),(3126,310),(3127,311),(3128,312),(3128,336),(3129,313),(3129,350),(3130,314),(3131,315),(3131,351),(3132,325),(3132,328),(3134,502),(3138,334),(3139,338),(3139,339),(3140,340),(3140,341),(3141,344),(3141,345),(3142,346),(3142,347),(3149,351),(3149,354),(3150,351),(3150,356),(3152,358),(3152,359),(3153,361),(3153,370),(3154,363),(3154,369),(3156,350),(3156,371),(3159,376),(3160,377),(3160,379),(3160,384),(3161,378),(3161,380),(3161,383),(3162,388),(3162,389),(3162,390),(3169,392),(3169,393),(3169,394),(3170,395),(3170,396),(3170,397),(3171,398),(3171,399),(3171,400),(3172,401),(3172,402),(3172,403),(3173,404),(3173,405),(3173,406),(3178,351),(3178,421),(3190,411),(3190,412),(3191,413),(3191,414),(3192,415),(3192,416),(3193,417),(3193,418),(3194,419),(3194,420),(3195,353),(3195,424),(3196,425),(3196,426),(3197,427),(3197,428),(3198,429),(3198,430),(3199,431),(3199,432),(3200,433),(3200,434),(3201,435),(3201,436),(3202,437),(3202,438),(3203,439),(3203,440),(3204,441),(3204,442),(3205,443),(3205,444),(3206,445),(3206,446),(3207,447),(3207,448),(3208,449),(3208,450),(3209,451),(3209,452),(3210,453),(3210,454),(3211,455),(3211,456),(3212,457),(3212,458),(3213,459),(3213,460),(3214,461),(3214,462),(3215,463),(3215,464),(3218,466),(3218,467),(3218,468),(3219,469),(3219,470),(3219,471),(3220,474),(3220,475),(3220,476),(3221,477),(3221,478),(3221,479),(3222,480),(3222,481),(3223,482),(3223,483),(3224,484),(3224,485),(3225,486),(3225,487),(3227,503),(3227,505),(3228,506),(3228,507),(3230,508),(3230,509),(3231,510),(3231,511),(3232,512),(3232,513),(3233,514),(3233,515),(3234,516),(3234,517),(3235,518),(3235,519),(3237,521),(3237,522),(3239,524),(3239,525),(3240,526),(3240,527),(3241,528),(3241,529),(3242,530),(3242,531),(3243,532),(3243,533),(3244,534),(3244,535),(3245,536),(3245,537),(3246,538),(3246,539),(3252,540),(3252,541),(3254,543),(3254,544),(3254,545),(3255,547),(3255,548),(3255,571),(3256,550),(3256,551),(3256,572),(3257,553),(3257,554),(3257,573),(3258,556),(3258,557),(3258,574),(3259,559),(3259,560),(3259,575),(3260,561),(3260,562),(3260,563),(3261,565),(3261,576),(3262,566),(3262,567),(3263,568),(3263,569),(3263,570),(3264,577),(3264,578),(3265,579),(3265,580),(3266,581),(3266,582),(3266,591),(3267,583),(3267,584),(3267,592),(3268,585),(3268,586),(3268,593),(3269,587),(3269,588),(3269,594),(3270,589),(3270,590),(3271,595),(3271,596),(3271,597),(3272,598),(3272,599),(3273,600),(3273,601),(3273,602),(3274,603),(3274,604),(3274,605),(3275,606),(3275,607),(3275,608),(3276,609),(3276,610),(3276,611),(3277,612),(3277,613),(3277,614),(3278,615),(3278,616),(3279,617),(3279,618),(3279,619),(3279,628),(3279,629),(3280,620),(3280,621),(3280,622),(3281,623),(3281,624),(3281,625),(3282,626),(3282,825),(3283,630),(3283,631),(3284,632),(3284,633),(3284,634),(3285,635),(3285,940),(3286,638),(3286,639),(3286,640),(3287,641),(3287,642),(3287,643),(3288,644),(3288,645),(3288,646),(3289,647),(3289,648),(3289,649),(3290,650),(3290,651),(3290,652),(3291,653),(3291,654),(3291,655),(3292,656),(3292,657),(3292,658),(3293,659),(3293,660),(3293,661),(3294,662),(3294,663),(3294,664),(3295,665),(3295,666),(3295,667),(3296,668),(3296,669),(3296,670),(3297,671),(3297,672),(3297,673),(3298,674),(3298,675),(3298,676),(3299,677),(3299,678),(3299,679),(3300,680),(3300,681),(3300,682),(3301,683),(3301,684),(3301,685),(3302,686),(3302,687),(3302,688),(3303,689),(3303,690),(3303,691),(3304,692),(3304,693),(3304,694),(3305,695),(3305,696),(3305,697),(3306,698),(3306,699),(3306,700),(3307,701),(3307,702),(3307,703),(3308,704),(3308,705),(3308,706),(3309,707),(3309,708),(3310,709),(3310,710),(3311,711),(3311,712),(3311,713),(3312,714),(3312,715),(3312,716),(3313,717),(3313,1167),(3314,720),(3314,721),(3314,722),(3315,723),(3315,724),(3315,725),(3316,726),(3316,727),(3316,728),(3317,729),(3317,730),(3317,731),(3318,732),(3318,733),(3318,734),(3319,735),(3319,736),(3319,737),(3320,738),(3320,739),(3320,740),(3321,741),(3321,742),(3322,743),(3322,744),(3323,745),(3323,746),(3323,747),(3324,748),(3324,749),(3324,750),(3325,751),(3325,752),(3325,753),(3326,754),(3326,755),(3327,756),(3327,757),(3328,758),(3328,789),(3329,761),(3329,790),(3330,762),(3330,763),(3331,768),(3331,785),(3331,786),(3332,769),(3332,783),(3332,784),(3335,766),(3336,767),(3343,770),(3343,771),(3344,772),(3344,773),(3345,774),(3345,775),(3347,776),(3347,777),(3347,987),(3348,778),(3348,779),(3349,780),(3372,781),(3372,782),(3373,787),(3373,788),(3376,791),(3376,792),(3377,793),(3377,794),(3378,799),(3378,800),(3379,801),(3379,802),(3380,795),(3380,796),(3381,797),(3381,798),(3383,805),(3384,806),(3384,807),(3385,808),(3385,809),(3386,810),(3386,811),(3387,812),(3387,814),(3388,815),(3388,816),(3391,817),(3391,818),(3391,819),(3392,820),(3392,821),(3392,822),(3393,826),(3393,827),(3394,828),(3394,829),(3395,830),(3395,831),(3396,834),(3396,835),(3397,832),(3397,833),(3398,836),(3398,837),(3399,838),(3399,839),(3410,850),(3410,851),(3411,852),(3411,853),(3412,848),(3412,849),(3419,860),(3419,951),(3420,859),(3420,861),(3422,862),(3422,863),(3423,864),(3423,865),(3424,866),(3424,867),(3424,872),(3424,873),(3425,868),(3425,869),(3425,874),(3425,875),(3426,878),(3426,879),(3427,876),(3427,877),(3428,880),(3432,884),(3432,885),(3432,886),(3434,887),(3434,888),(3434,889),(3441,894),(3441,895),(3442,896),(3442,897),(3444,904),(3445,905),(3449,906),(3449,907),(3450,908),(3450,909),(3453,910),(3458,915),(3458,916),(3459,917),(3459,918),(3463,919),(3463,920),(3485,929),(3486,930),(3487,931),(3488,932),(3489,933),(3493,2),(3494,2),(3501,934),(3502,936),(3503,938),(3504,939),(3505,941),(3506,942),(3507,943),(3508,944),(3509,945),(3510,946),(3511,947),(3512,948),(3514,949),(3514,950),(3515,953),(3516,954),(3517,955),(3518,956),(3519,957),(3520,958),(3521,959),(3527,960),(3527,965),(3528,961),(3528,962),(3529,963),(3529,964),(3530,966),(3530,967),(3531,968),(3531,969),(3535,970),(3535,971),(3536,972),(3536,973),(3540,999),(3540,1000),(3541,1001),(8888,9999); +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result index e8e5bf36f84..465cc875af0 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result @@ -286,7 +286,7 @@ INSERT INTO t1 VALUES (4); master_gtid_wait('2-1-2') 0 KILL CONNECTION KILL_ID; -ERROR HY000: Lost connection to MySQL server during query +Got one of the listed errors SET gtid_domain_id=1; SET gtid_seq_no=4; INSERT INTO t1 VALUES (5); @@ -386,7 +386,7 @@ SET GLOBAL slave_ddl_exec_mode=STRICT; SET sql_slave_skip_counter=1; START SLAVE UNTIL master_gtid_pos="3-1-100"; include/sync_with_master_gtid.inc -include/wait_for_slave_sql_to_stop.inc +include/wait_for_slave_to_stop.inc SELECT * FROM t2; ERROR 42S02: Table 'test.t2' doesn't exist SELECT IF(LOCATE("3-1-100", @@GLOBAL.gtid_slave_pos)>0, "Ok", CONCAT("ERROR! expected GTID 3-1-100 not found in gtid_slave_pos: ", @@GLOBAL.gtid_slave_pos)) AS status; diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result index 3417ad561f4..75bd9d0cbb1 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result @@ -3,6 +3,7 @@ include/rpl_init.inc [topology=1->2] call mtr.add_suppression("Checking table:"); call mtr.add_suppression("client is using or hasn't closed the table properly"); call mtr.add_suppression("Table .* is marked as crashed and should be repaired"); +call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); flush tables; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; @@ -133,9 +134,17 @@ SELECT @@GLOBAL.server_id; 3 SELECT * from t1 WHERE a > 10 ORDER BY a; a +gtid_check +Binlog pos ok # Wait 30 seconds for SQL thread to catch up with IO thread SELECT * from t1 WHERE a > 10 ORDER BY a; a +gtid_check +Binlog pos ok +gtid_check +Slave pos ok +gtid_check +Current pos ok # Repeat this with additional transactions on the master SET GLOBAL debug_dbug="+d,inject_error_writing_xid"; BEGIN; @@ -175,11 +184,21 @@ SELECT * from t1 WHERE a > 10 ORDER BY a; a 13 14 +gtid_check +Binlog pos ok +gtid_check +Current pos ok # Wait 30 seconds for SQL thread to catch up with IO thread SELECT * from t1 WHERE a > 10 ORDER BY a; a 13 14 +gtid_check +Binlog pos ok +gtid_check +Slave pos ok +gtid_check +Current pos ok # Repeat this with additional transactions on the master SET GLOBAL debug_dbug="+d,inject_error_writing_xid"; BEGIN; @@ -205,5 +224,48 @@ a 14 23 24 +# Repeat this with slave restart +SET GLOBAL debug_dbug="+d,inject_error_writing_xid"; +BEGIN; +INSERT INTO t1 VALUES (25); +COMMIT; +ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") +SET GLOBAL debug_dbug="+d,crash_dispatch_command_before"; +COMMIT; +Got one of the listed errors +# Wait 30 seconds for IO thread to connect and SQL thread to catch up +# with IO thread. +include/stop_slave.inc +gtid_check +Binlog pos ok +gtid_check +Current pos ok +INSERT INTO t1 VALUES (26); +INSERT INTO t1 VALUES (27); +SELECT * from t1 WHERE a > 10 ORDER BY a; +a +13 +14 +23 +24 +26 +27 +include/save_master_gtid.inc +gtid_check +Binlog pos ok +gtid_check +Slave pos ok +gtid_check +Current pos ok +include/start_slave.inc +include/sync_with_master_gtid.inc +SELECT * from t1 WHERE a > 10 ORDER BY a; +a +13 +14 +23 +24 +26 +27 DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mdev6386.result b/mysql-test/suite/rpl/r/rpl_mdev6386.result index 352b9d07fef..fa49d9a9c03 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev6386.result +++ b/mysql-test/suite/rpl/r/rpl_mdev6386.result @@ -22,6 +22,7 @@ INSERT INTO t2 VALUE (4, 1); INSERT INTO t2 VALUE (5, 1); INSERT INTO t1 SELECT * FROM t2; DROP TEMPORARY TABLE t2; +include/save_master_gtid.inc Contents on master: SELECT * FROM t1 ORDER BY a; a b @@ -41,6 +42,7 @@ SET sql_log_bin= 0; DELETE FROM t1 WHERE a=1; SET sql_log_bin= 1; include/start_slave.inc +include/sync_with_master_gtid.inc Contents on slave after: SELECT * FROM t1 ORDER BY a; a b diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index ac21e7a3e01..7ceb5ee6622 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -972,6 +972,170 @@ SET GLOBAL binlog_format= @old_format; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; include/start_slave.inc +*** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave *** +INSERT INTO t2 VALUES (40); +include/stop_slave.inc +CHANGE MASTER TO master_use_gtid=no; +SET @old_dbug= @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100"; +SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger"; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +INSERT INTO t2 VALUES (41); +INSERT INTO t2 VALUES (42); +SET @old_format= @@binlog_format; +SET binlog_format= statement; +DELETE FROM t2 WHERE a=40; +SET binlog_format= @old_format; +INSERT INTO t2 VALUES (43); +INSERT INTO t2 VALUES (44); +FLUSH LOGS; +INSERT INTO t2 VALUES (45); +SET gtid_seq_no=100; +INSERT INTO t2 VALUES (46); +BEGIN; +SELECT * FROM t2 WHERE a=40 FOR UPDATE; +a +40 +include/start_slave.inc +SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100'; +STOP SLAVE; +SET debug_sync= 'now WAIT_FOR wait_for_done_waiting'; +ROLLBACK; +include/wait_for_slave_sql_to_stop.inc +SELECT * FROM t2 WHERE a >= 40 ORDER BY a; +a +41 +42 +include/start_slave.inc +SELECT * FROM t2 WHERE a >= 40 ORDER BY a; +a +41 +42 +43 +44 +45 +46 +include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; +SET DEBUG_SYNC= 'RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +CHANGE MASTER TO master_use_gtid=slave_pos; +include/start_slave.inc +*** MDEV-7326 Server deadlock in connection with parallel replication *** +include/stop_slave.inc +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=3; +SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid"; +include/start_slave.inc +SET @old_format= @@SESSION.binlog_format; +SET binlog_format= STATEMENT; +INSERT INTO t1 VALUES (foo(50, +"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready", +"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont")); +SET DEBUG_SYNC= "now WAIT_FOR prep_ready"; +INSERT INTO t2 VALUES (foo(50, +"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1", +"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2")); +SET DEBUG_SYNC= "now WAIT_FOR t1_ready1"; +INSERT INTO t1 VALUES (foo(51, +"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1", +"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2")); +SET DEBUG_SYNC= "now WAIT_FOR t2_ready1"; +SET DEBUG_SYNC= "now SIGNAL t1_cont1"; +SET DEBUG_SYNC= "now WAIT_FOR t1_ready2"; +INSERT INTO t1 VALUES (52); +SET BINLOG_FORMAT= @old_format; +SELECT * FROM t2 WHERE a>=50 ORDER BY a; +a +50 +SELECT * FROM t1 WHERE a>=50 ORDER BY a; +a +50 +51 +52 +SET DEBUG_SYNC= "now SIGNAL prep_cont"; +SET DEBUG_SYNC= "now WAIT_FOR t3_ready"; +SET DEBUG_SYNC= "now SIGNAL t2_cont1"; +SET DEBUG_SYNC= "now WAIT_FOR t2_ready2"; +SET DEBUG_SYNC= "now SIGNAL t1_cont2"; +SELECT * FROM t2 WHERE a>=50 ORDER BY a; +a +50 +SELECT * FROM t1 WHERE a>=50 ORDER BY a; +a +50 +51 +52 +SET DEBUG_SYNC="reset"; +include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +include/start_slave.inc +*** MDEV-7326 Server deadlock in connection with parallel replication *** +include/stop_slave.inc +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=3; +SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid"; +include/start_slave.inc +SET @old_format= @@SESSION.binlog_format; +SET binlog_format= STATEMENT; +INSERT INTO t1 VALUES (foo(60, +"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready", +"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont")); +SET DEBUG_SYNC= "now WAIT_FOR prep_ready"; +INSERT INTO t2 VALUES (foo(60, +"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1", +"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2")); +SET DEBUG_SYNC= "now WAIT_FOR t1_ready1"; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +INSERT INTO t1 VALUES (foo(61, +"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1", +"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2")); +SET debug_sync='now WAIT_FOR master_queued1'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +INSERT INTO t6 VALUES (62); +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='now SIGNAL master_cont1'; +SET debug_sync='RESET'; +SET BINLOG_FORMAT= @old_format; +SELECT * FROM t2 WHERE a>=60 ORDER BY a; +a +60 +SELECT * FROM t1 WHERE a>=60 ORDER BY a; +a +60 +61 +SELECT * FROM t6 WHERE a>=60 ORDER BY a; +a +62 +SET DEBUG_SYNC= "now WAIT_FOR t2_ready1"; +SET DEBUG_SYNC= "now SIGNAL t1_cont1"; +SET DEBUG_SYNC= "now WAIT_FOR t1_ready2"; +SET DEBUG_SYNC= "now SIGNAL prep_cont"; +SET DEBUG_SYNC= "now WAIT_FOR t3_ready"; +SET DEBUG_SYNC= "now SIGNAL t2_cont1"; +SET DEBUG_SYNC= "now WAIT_FOR t2_ready2"; +SET DEBUG_SYNC= "now SIGNAL t1_cont2"; +SELECT * FROM t2 WHERE a>=60 ORDER BY a; +a +60 +SELECT * FROM t1 WHERE a>=60 ORDER BY a; +a +60 +61 +SELECT * FROM t6 WHERE a>=60 ORDER BY a; +a +62 +SET DEBUG_SYNC="reset"; +include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +include/start_slave.inc include/stop_slave.inc SET GLOBAL slave_parallel_threads=@old_parallel_threads; include/start_slave.inc diff --git a/mysql-test/suite/rpl/r/rpl_parallel2.result b/mysql-test/suite/rpl/r/rpl_parallel2.result index 49be484f419..8bf8b9caf3b 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel2.result +++ b/mysql-test/suite/rpl/r/rpl_parallel2.result @@ -9,6 +9,7 @@ CALL mtr.add_suppression("Unsafe statement written to the binary log using state INSERT INTO t1 VALUES (1,sleep(2)); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. +include/wait_for_slave_param.inc [Seconds_Behind_Master] Seconds_Behind_Master should be zero here because the slave is fully caught up and idle. Seconds_Behind_Master = '0' include/stop_slave.inc diff --git a/mysql-test/suite/rpl/t/myisam_external_lock-slave.opt b/mysql-test/suite/rpl/t/myisam_external_lock-slave.opt new file mode 100644 index 00000000000..db53e17d4b3 --- /dev/null +++ b/mysql-test/suite/rpl/t/myisam_external_lock-slave.opt @@ -0,0 +1,2 @@ +--log-slave-updates=0 +--skip_external_locking=0 diff --git a/mysql-test/suite/rpl/t/myisam_external_lock.test b/mysql-test/suite/rpl/t/myisam_external_lock.test new file mode 100644 index 00000000000..14824fd8321 --- /dev/null +++ b/mysql-test/suite/rpl/t/myisam_external_lock.test @@ -0,0 +1,24 @@ +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# +# MDEV-6871 Multi-value insert on MyISAM table that makes slaves crash +# This only happens if external_lock is enabled +# + +drop table if exists t1; +CREATE TABLE `t1` (`col1` int(11) NOT NULL,`col2` int(11) NOT NULL, + PRIMARY KEY (`col1`,`col2`), + KEY `col2` (`col2`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO `t1` VALUES (2775,974),(2775,975),(2775,976),(2778,977),(2778,978),(2782,979),(2790,986),(2790,1139),(2792,840),(2792,984),(2792,989),(2793,982),(2793,992),(2793,993),(2793,994),(2795,323),(2795,332),(2797,980),(2797,997),(2797,998),(2798,1103),(2798,1104),(2799,841),(2799,985),(2799,988),(2833,983),(2833,990),(2833,991),(2834,981),(2834,995),(2834,996),(2835,316),(2835,317),(3007,854),(3007,856),(3008,855),(3008,857),(3009,823),(3009,824),(3014,1),(3015,1),(3016,2),(3017,2),(3018,3),(3019,3),(3024,842),(3024,843),(3024,844),(3025,845),(3025,846),(3025,847),(3040,31),(3041,32),(3042,52),(3042,55),(3043,53),(3043,54),(3044,278),(3044,279),(3044,280),(3044,281),(3044,282),(3044,283),(3044,284),(3044,285),(3045,1),(3046,1),(3049,220),(3050,221),(3050,222),(3051,2),(3052,2),(3053,223),(3054,224),(3055,225),(3056,226),(3057,227),(3058,228),(3059,229),(3060,327),(3066,236),(3067,237),(3068,238),(3069,239),(3070,240),(3080,241),(3081,242),(3082,247),(3083,248),(3084,249),(3085,250),(3086,251),(3087,252),(3088,253),(3089,254),(3090,255),(3091,256),(3092,257),(3093,258),(3094,259),(3096,263),(3097,264),(3100,273),(3100,302),(3101,266),(3102,267),(3103,268),(3104,269),(3105,270),(3111,275),(3112,238),(3113,272),(3115,286),(3116,318),(3116,319),(3117,290),(3117,292),(3118,238),(3119,291),(3119,293),(3120,304),(3121,305),(3122,306),(3123,307),(3124,308),(3125,309),(3126,310),(3127,311),(3128,312),(3128,336),(3129,313),(3129,350),(3130,314),(3131,315),(3131,351),(3132,325),(3132,328),(3134,502),(3138,334),(3139,338),(3139,339),(3140,340),(3140,341),(3141,344),(3141,345),(3142,346),(3142,347),(3149,351),(3149,354),(3150,351),(3150,356),(3152,358),(3152,359),(3153,361),(3153,370),(3154,363),(3154,369),(3156,350),(3156,371),(3159,376),(3160,377),(3160,379),(3160,384),(3161,378),(3161,380),(3161,383),(3162,388),(3162,389),(3162,390),(3169,392),(3169,393),(3169,394),(3170,395),(3170,396),(3170,397),(3171,398),(3171,399),(3171,400),(3172,401),(3172,402),(3172,403),(3173,404),(3173,405),(3173,406),(3178,351),(3178,421),(3190,411),(3190,412),(3191,413),(3191,414),(3192,415),(3192,416),(3193,417),(3193,418),(3194,419),(3194,420),(3195,353),(3195,424),(3196,425),(3196,426),(3197,427),(3197,428),(3198,429),(3198,430),(3199,431),(3199,432),(3200,433),(3200,434),(3201,435),(3201,436),(3202,437),(3202,438),(3203,439),(3203,440),(3204,441),(3204,442),(3205,443),(3205,444),(3206,445),(3206,446),(3207,447),(3207,448),(3208,449),(3208,450),(3209,451),(3209,452),(3210,453),(3210,454),(3211,455),(3211,456),(3212,457),(3212,458),(3213,459),(3213,460),(3214,461),(3214,462),(3215,463),(3215,464),(3218,466),(3218,467),(3218,468),(3219,469),(3219,470),(3219,471),(3220,474),(3220,475),(3220,476),(3221,477),(3221,478),(3221,479),(3222,480),(3222,481),(3223,482),(3223,483),(3224,484),(3224,485),(3225,486),(3225,487),(3227,503),(3227,505),(3228,506),(3228,507),(3230,508),(3230,509),(3231,510),(3231,511),(3232,512),(3232,513),(3233,514),(3233,515),(3234,516),(3234,517),(3235,518),(3235,519),(3237,521),(3237,522),(3239,524),(3239,525),(3240,526),(3240,527),(3241,528),(3241,529),(3242,530),(3242,531),(3243,532),(3243,533),(3244,534),(3244,535),(3245,536),(3245,537),(3246,538),(3246,539),(3252,540),(3252,541),(3254,543),(3254,544),(3254,545),(3255,547),(3255,548),(3255,571),(3256,550),(3256,551),(3256,572),(3257,553),(3257,554),(3257,573),(3258,556),(3258,557),(3258,574),(3259,559),(3259,560),(3259,575),(3260,561),(3260,562),(3260,563),(3261,565),(3261,576),(3262,566),(3262,567),(3263,568),(3263,569),(3263,570),(3264,577),(3264,578),(3265,579),(3265,580),(3266,581),(3266,582),(3266,591),(3267,583),(3267,584),(3267,592),(3268,585),(3268,586),(3268,593),(3269,587),(3269,588),(3269,594),(3270,589),(3270,590),(3271,595),(3271,596),(3271,597),(3272,598),(3272,599),(3273,600),(3273,601),(3273,602),(3274,603),(3274,604),(3274,605),(3275,606),(3275,607),(3275,608),(3276,609),(3276,610),(3276,611),(3277,612),(3277,613),(3277,614),(3278,615),(3278,616),(3279,617),(3279,618),(3279,619),(3279,628),(3279,629),(3280,620),(3280,621),(3280,622),(3281,623),(3281,624),(3281,625),(3282,626),(3282,825),(3283,630),(3283,631),(3284,632),(3284,633),(3284,634),(3285,635),(3285,940),(3286,638),(3286,639),(3286,640),(3287,641),(3287,642),(3287,643),(3288,644),(3288,645),(3288,646),(3289,647),(3289,648),(3289,649),(3290,650),(3290,651),(3290,652),(3291,653),(3291,654),(3291,655),(3292,656),(3292,657),(3292,658),(3293,659),(3293,660),(3293,661),(3294,662),(3294,663),(3294,664),(3295,665),(3295,666),(3295,667),(3296,668),(3296,669),(3296,670),(3297,671),(3297,672),(3297,673),(3298,674),(3298,675),(3298,676),(3299,677),(3299,678),(3299,679),(3300,680),(3300,681),(3300,682),(3301,683),(3301,684),(3301,685),(3302,686),(3302,687),(3302,688),(3303,689),(3303,690),(3303,691),(3304,692),(3304,693),(3304,694),(3305,695),(3305,696),(3305,697),(3306,698),(3306,699),(3306,700),(3307,701),(3307,702),(3307,703),(3308,704),(3308,705),(3308,706),(3309,707),(3309,708),(3310,709),(3310,710),(3311,711),(3311,712),(3311,713),(3312,714),(3312,715),(3312,716),(3313,717),(3313,1167),(3314,720),(3314,721),(3314,722),(3315,723),(3315,724),(3315,725),(3316,726),(3316,727),(3316,728),(3317,729),(3317,730),(3317,731),(3318,732),(3318,733),(3318,734),(3319,735),(3319,736),(3319,737),(3320,738),(3320,739),(3320,740),(3321,741),(3321,742),(3322,743),(3322,744),(3323,745),(3323,746),(3323,747),(3324,748),(3324,749),(3324,750),(3325,751),(3325,752),(3325,753),(3326,754),(3326,755),(3327,756),(3327,757),(3328,758),(3328,789),(3329,761),(3329,790),(3330,762),(3330,763),(3331,768),(3331,785),(3331,786),(3332,769),(3332,783),(3332,784),(3335,766),(3336,767),(3343,770),(3343,771),(3344,772),(3344,773),(3345,774),(3345,775),(3347,776),(3347,777),(3347,987),(3348,778),(3348,779),(3349,780),(3372,781),(3372,782),(3373,787),(3373,788),(3376,791),(3376,792),(3377,793),(3377,794),(3378,799),(3378,800),(3379,801),(3379,802),(3380,795),(3380,796),(3381,797),(3381,798),(3383,805),(3384,806),(3384,807),(3385,808),(3385,809),(3386,810),(3386,811),(3387,812),(3387,814),(3388,815),(3388,816),(3391,817),(3391,818),(3391,819),(3392,820),(3392,821),(3392,822),(3393,826),(3393,827),(3394,828),(3394,829),(3395,830),(3395,831),(3396,834),(3396,835),(3397,832),(3397,833),(3398,836),(3398,837),(3399,838),(3399,839),(3410,850),(3410,851),(3411,852),(3411,853),(3412,848),(3412,849),(3419,860),(3419,951),(3420,859),(3420,861),(3422,862),(3422,863),(3423,864),(3423,865),(3424,866),(3424,867),(3424,872),(3424,873),(3425,868),(3425,869),(3425,874),(3425,875),(3426,878),(3426,879),(3427,876),(3427,877),(3428,880),(3432,884),(3432,885),(3432,886),(3434,887),(3434,888),(3434,889),(3441,894),(3441,895),(3442,896),(3442,897),(3444,904),(3445,905),(3449,906),(3449,907),(3450,908),(3450,909),(3453,910),(3458,915),(3458,916),(3459,917),(3459,918),(3463,919),(3463,920),(3485,929),(3486,930),(3487,931),(3488,932),(3489,933),(3493,2),(3494,2),(3501,934),(3502,936),(3503,938),(3504,939),(3505,941),(3506,942),(3507,943),(3508,944),(3509,945),(3510,946),(3511,947),(3512,948),(3514,949),(3514,950),(3515,953),(3516,954),(3517,955),(3518,956),(3519,957),(3520,958),(3521,959),(3527,960),(3527,965),(3528,961),(3528,962),(3529,963),(3529,964),(3530,966),(3530,967),(3531,968),(3531,969),(3535,970),(3535,971),(3536,972),(3536,973),(3540,999),(3540,1000),(3541,1001),(8888,9999); + +drop table t1; + +save_master_pos; +connection slave; +sync_with_master; + +connection master; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_gtid_basic.test b/mysql-test/suite/rpl/t/rpl_gtid_basic.test index 5ecff519aef..19f90fce197 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_basic.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_basic.test @@ -334,7 +334,7 @@ reap; eval KILL CONNECTION $kill2_id; --connection s6 ---error 2013 +--error 2013,ER_CONNECTION_KILLED reap; --connection server_1 @@ -456,7 +456,7 @@ SET sql_slave_skip_counter=1; START SLAVE UNTIL master_gtid_pos="3-1-100"; --let $master_pos=3-1-100 --source include/sync_with_master_gtid.inc ---source include/wait_for_slave_sql_to_stop.inc +--source include/wait_for_slave_to_stop.inc --error ER_NO_SUCH_TABLE SELECT * FROM t2; SELECT IF(LOCATE("3-1-100", @@GLOBAL.gtid_slave_pos)>0, "Ok", CONCAT("ERROR! expected GTID 3-1-100 not found in gtid_slave_pos: ", @@GLOBAL.gtid_slave_pos)) AS status; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash-slave.opt b/mysql-test/suite/rpl/t/rpl_gtid_crash-slave.opt new file mode 100644 index 00000000000..69c1a64e388 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_gtid_crash-slave.opt @@ -0,0 +1 @@ +--master-retry-count=100 diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash.test b/mysql-test/suite/rpl/t/rpl_gtid_crash.test index 0caad2a12fe..90b4e454a74 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_crash.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_crash.test @@ -12,6 +12,11 @@ call mtr.add_suppression("Checking table:"); call mtr.add_suppression("client is using or hasn't closed the table properly"); call mtr.add_suppression("Table .* is marked as crashed and should be repaired"); +# We have seen this warning a couple of times in Buildbot. Since we crash the +# server deliberately, it seems possible that we could in rare cases crash in +# the middle of a page write. The page is recovered from the doublewrite +# buffer ("[Note] InnoDB: Recovered the page from the doublewrite buffer."). +call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); flush tables; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; @@ -210,6 +215,7 @@ EOF wait EOF SET GLOBAL debug_dbug="+d,inject_crash_before_flush_rli"; +--error 0,2006,2013 START SLAVE; --connection server_1 @@ -234,6 +240,7 @@ EOF wait EOF SET GLOBAL debug_dbug="+d,inject_crash_after_flush_rli"; +--error 0,2006,2013 START SLAVE; --connection server_1 @@ -269,6 +276,7 @@ SET GLOBAL debug_dbug="+d,crash_before_writing_xid"; --connection server_1 INSERT INTO t1 VALUES (9), (10); +--let $saved_gtid=`SELECT @@last_gtid` --save_master_pos --connection server_2 @@ -333,6 +341,9 @@ EOF SELECT @@GLOBAL.server_id; SELECT * from t1 WHERE a > 10 ORDER BY a; +--disable_query_log +eval SELECT IF(INSTR(@@gtid_binlog_pos, '$saved_gtid'), "Binlog pos ok", CONCAT("Unexpected binlog pos: ", @@gtid_binlog_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +--enable_query_log --echo # Wait 30 seconds for SQL thread to catch up with IO thread --connection server_2 @@ -357,6 +368,11 @@ if ($read_log_pos != $exec_log_pos) } SELECT * from t1 WHERE a > 10 ORDER BY a; +--disable_query_log +eval SELECT IF(INSTR(@@gtid_binlog_pos, '$saved_gtid'), "Binlog pos ok", CONCAT("Unexpected binlog pos: ", @@gtid_binlog_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +eval SELECT IF(INSTR(@@gtid_slave_pos, '$saved_gtid'), "Slave pos ok", CONCAT("Unexpected slave pos: ", @@gtid_slave_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +eval SELECT IF(INSTR(@@gtid_current_pos, '$saved_gtid'), "Current pos ok", CONCAT("Unexpected current pos: ", @@gtid_current_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +--enable_query_log --echo # Repeat this with additional transactions on the master @@ -387,6 +403,7 @@ EOF SELECT @@GLOBAL.server_id; INSERT INTO t1 VALUES (13); INSERT INTO t1 VALUES (14); +--let $saved_gtid=`SELECT @@last_gtid` SELECT * from t1 WHERE a > 10 ORDER BY a; --source include/save_master_gtid.inc @@ -420,6 +437,10 @@ EOF SELECT @@GLOBAL.server_id; SELECT * from t1 WHERE a > 10 ORDER BY a; +--disable_query_log +eval SELECT IF(INSTR(@@gtid_binlog_pos, '$saved_gtid'), "Binlog pos ok", CONCAT("Unexpected binlog pos: ", @@gtid_binlog_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +eval SELECT IF(INSTR(@@gtid_current_pos, '$saved_gtid'), "Current pos ok", CONCAT("Unexpected current pos: ", @@gtid_current_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +--enable_query_log --echo # Wait 30 seconds for SQL thread to catch up with IO thread --connection server_2 @@ -444,6 +465,11 @@ if ($read_log_pos != $exec_log_pos) } SELECT * from t1 WHERE a > 10 ORDER BY a; +--disable_query_log +eval SELECT IF(INSTR(@@gtid_binlog_pos, '$saved_gtid'), "Binlog pos ok", CONCAT("Unexpected binlog pos: ", @@gtid_binlog_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +eval SELECT IF(INSTR(@@gtid_slave_pos, '$saved_gtid'), "Slave pos ok", CONCAT("Unexpected slave pos: ", @@gtid_slave_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +eval SELECT IF(INSTR(@@gtid_current_pos, '$saved_gtid'), "Current pos ok", CONCAT("Unexpected current pos: ", @@gtid_current_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +--enable_query_log --echo # Repeat this with additional transactions on the master @@ -472,6 +498,7 @@ EOF INSERT INTO t1 VALUES (23); INSERT INTO t1 VALUES (24); +--let $saved_gtid=`SELECT @@last_gtid` SELECT * from t1 WHERE a > 10 ORDER BY a; --source include/save_master_gtid.inc @@ -479,6 +506,86 @@ SELECT * from t1 WHERE a > 10 ORDER BY a; --source include/sync_with_master_gtid.inc SELECT * from t1 WHERE a > 10 ORDER BY a; +--echo # Repeat this with slave restart + +--connection server_1 +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +wait +EOF + +SET GLOBAL debug_dbug="+d,inject_error_writing_xid"; +BEGIN; +INSERT INTO t1 VALUES (25); +--error ER_ERROR_ON_WRITE +COMMIT; +SET GLOBAL debug_dbug="+d,crash_dispatch_command_before"; +--error 2006,2013 +COMMIT; + +--source include/wait_until_disconnected.inc + +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart +EOF + +--connection server_1 +--enable_reconnect +--source include/wait_until_connected_again.inc + +--connection server_2 +--echo # Wait 30 seconds for IO thread to connect and SQL thread to catch up +--echo # with IO thread. +--let $wait_timeout= 300 +while ($wait_timeout != 0) +{ + --let $connected=`SELECT COUNT(*) > 0 FROM information_schema.processlist WHERE State = 'Waiting for master to send event'` + if ($connected) + { + --let $read_log_pos= query_get_value('SHOW SLAVE STATUS', Read_Master_Log_Pos, 1) + --let $exec_log_pos= query_get_value('SHOW SLAVE STATUS', Exec_Master_Log_Pos, 1) + if ($read_log_pos == $exec_log_pos) + { + --let $wait_timeout= 0 + } + if ($read_log_pos != $exec_log_pos) + { + --sleep 0.1 + --dec $wait_timeout + } + } + if (!$connected) + { + --sleep 0.1 + --dec $wait_timeout + } +} +if (`SELECT NOT $connected OR $read_log_pos != $exec_log_pos`) +{ + --die Timeout wait for IO thread to connect and SQL thread to catch up with IO thread +} + +--source include/stop_slave.inc + +--connection server_1 +--disable_query_log +eval SELECT IF(INSTR(@@gtid_binlog_pos, '$saved_gtid'), "Binlog pos ok", CONCAT("Unexpected binlog pos: ", @@gtid_binlog_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +eval SELECT IF(INSTR(@@gtid_current_pos, '$saved_gtid'), "Current pos ok", CONCAT("Unexpected current pos: ", @@gtid_current_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +--enable_query_log +INSERT INTO t1 VALUES (26); +INSERT INTO t1 VALUES (27); +SELECT * from t1 WHERE a > 10 ORDER BY a; +--source include/save_master_gtid.inc + +--connection server_2 +--disable_query_log +eval SELECT IF(INSTR(@@gtid_binlog_pos, '$saved_gtid'), "Binlog pos ok", CONCAT("Unexpected binlog pos: ", @@gtid_binlog_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +eval SELECT IF(INSTR(@@gtid_slave_pos, '$saved_gtid'), "Slave pos ok", CONCAT("Unexpected slave pos: ", @@gtid_slave_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +eval SELECT IF(INSTR(@@gtid_current_pos, '$saved_gtid'), "Current pos ok", CONCAT("Unexpected current pos: ", @@gtid_current_pos, "; does not contain the GTID $saved_gtid.")) AS gtid_check; +--enable_query_log +--source include/start_slave.inc +--source include/sync_with_master_gtid.inc +SELECT * from t1 WHERE a > 10 ORDER BY a; + --connection server_1 DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_mdev6386.test b/mysql-test/suite/rpl/t/rpl_mdev6386.test index 5513d15a77d..3e4e79ea5a3 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev6386.test +++ b/mysql-test/suite/rpl/t/rpl_mdev6386.test @@ -31,7 +31,7 @@ INSERT INTO t2 VALUE (4, 1); INSERT INTO t2 VALUE (5, 1); INSERT INTO t1 SELECT * FROM t2; DROP TEMPORARY TABLE t2; ---save_master_pos +--source include/save_master_gtid.inc --echo Contents on master: SELECT * FROM t1 ORDER BY a; @@ -56,7 +56,7 @@ DELETE FROM t1 WHERE a=1; SET sql_log_bin= 1; --source include/start_slave.inc ---sync_with_master +--source include/sync_with_master_gtid.inc --echo Contents on slave after: SELECT * FROM t1 ORDER BY a; diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index d3ec08f5508..d4b99d4b0f7 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel.test @@ -1535,6 +1535,315 @@ SET GLOBAL slave_parallel_threads=10; --source include/start_slave.inc +--echo *** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave *** +--connection server_1 +INSERT INTO t2 VALUES (40); +--save_master_pos + +--connection server_2 +--sync_with_master +--source include/stop_slave.inc +CHANGE MASTER TO master_use_gtid=no; +SET @old_dbug= @@GLOBAL.debug_dbug; +# This DBUG injection causes a DEBUG_SYNC signal "scheduled_gtid_0_x_100" when +# GTID 0-1-100 has been scheduled for and fetched by a worker thread. +SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100"; +# This DBUG injection causes a DEBUG_SYNC signal "wait_for_done_waiting" when +# STOP SLAVE has signalled all worker threads to stop. +SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger"; +# Reset worker threads to make DBUG setting catch on. +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; + + +--connection server_1 +# Setup some transaction for the slave to replicate. +INSERT INTO t2 VALUES (41); +INSERT INTO t2 VALUES (42); +# Need to log the DELETE in statement format, so we can see it in processlist. +SET @old_format= @@binlog_format; +SET binlog_format= statement; +DELETE FROM t2 WHERE a=40; +SET binlog_format= @old_format; +INSERT INTO t2 VALUES (43); +INSERT INTO t2 VALUES (44); +# Force the slave to switch to a new relay log file. +FLUSH LOGS; +INSERT INTO t2 VALUES (45); +# Inject a GTID 0-1-100, which will trigger a DEBUG_SYNC signal when this +# transaction has been fetched by a worker thread. +SET gtid_seq_no=100; +INSERT INTO t2 VALUES (46); +--save_master_pos + +--connection con_temp2 +# Temporarily block the DELETE on a=40 from completing. +BEGIN; +SELECT * FROM t2 WHERE a=40 FOR UPDATE; + + +--connection server_2 +--source include/start_slave.inc + +# Wait for a worker thread to start on the DELETE that will be blocked +# temporarily by the SELECT FOR UPDATE. +--let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHERE state='updating' and info LIKE '%DELETE FROM t2 WHERE a=40%' +--source include/wait_condition.inc + +# The DBUG injection set above will make the worker thread signal the following +# debug_sync when the GTID 0-1-100 has been reached by a worker thread. +# Thus, at this point, the SQL driver thread has reached the next +# relay log file name, while a worker thread is still processing a +# transaction in the previous relay log file, blocked on the SELECT FOR +# UPDATE. +SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100'; +# At this point, the SQL driver thread is in the new relay log file, while +# the DELETE from the old relay log file is not yet complete. We will stop +# the slave at this point. The bug was that the DELETE statement would +# update the slave position to the _new_ relay log file name instead of +# its own old file name. Thus, by stoping and restarting the slave at this +# point, we would get an error at restart due to incorrect position. (If +# we would let the slave catch up before stopping, the incorrect position +# would be corrected by a later transaction). + +send STOP SLAVE; + +--connection con_temp2 +# Wait for STOP SLAVE to have proceeded sufficiently that it has signalled +# all worker threads to stop; this ensures that we will stop after the DELETE +# transaction (and not after a later transaction that might have been able +# to set a fixed position). +SET debug_sync= 'now WAIT_FOR wait_for_done_waiting'; +# Now release the row lock that was blocking the replication of DELETE. +ROLLBACK; + +--connection server_2 +reap; +--source include/wait_for_slave_sql_to_stop.inc +SELECT * FROM t2 WHERE a >= 40 ORDER BY a; +# Now restart the slave. With the bug present, this would start at an +# incorrect relay log position, causing relay log read error (or if unlucky, +# silently skip a number of events). +--source include/start_slave.inc +--sync_with_master +SELECT * FROM t2 WHERE a >= 40 ORDER BY a; +--source include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; +SET DEBUG_SYNC= 'RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +CHANGE MASTER TO master_use_gtid=slave_pos; +--source include/start_slave.inc + + +--echo *** MDEV-7326 Server deadlock in connection with parallel replication *** +# We use three transactions, each in a separate group commit. +# T1 does mark_start_commit(), then gets a deadlock error. +# T2 wakes up and starts running +# T1 does unmark_start_commit() +# T3 goes to wait for T2 to start its commit +# T2 does mark_start_commit() +# The bug was that at this point, T3 got deadlocked. Because T1 has unmarked(), +# T3 did not yet see the count_committing_event_groups reach its target value +# yet. But when T1 later re-did mark_start_commit(), it failed to send a wakeup +# to T3. + +--connection server_2 +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=3; +SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid"; +--source include/start_slave.inc + +--connection server_1 +SET @old_format= @@SESSION.binlog_format; +SET binlog_format= STATEMENT; +# This debug_sync will linger on and be used to control T3 later. +INSERT INTO t1 VALUES (foo(50, + "rpl_parallel_start_waiting_for_prior SIGNAL t3_ready", + "rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont")); +--save_master_pos +--connection server_2 +# Wait for the debug_sync point for T3 to be set. But let the preparation +# transaction remain hanging, so that T1 and T2 will be scheduled for the +# remaining two worker threads. +SET DEBUG_SYNC= "now WAIT_FOR prep_ready"; + +--connection server_1 +INSERT INTO t2 VALUES (foo(50, + "rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1", + "rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2")); +--save_master_pos + +--connection server_2 +SET DEBUG_SYNC= "now WAIT_FOR t1_ready1"; +# T1 has now done mark_start_commit(). It will later do a rollback and retry. + +--connection server_1 +# Use a MyISAM table for T2 and T3, so they do not trigger the +# rpl_parallel_simulate_temp_err_xid DBUG insertion on XID event. +INSERT INTO t1 VALUES (foo(51, + "rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1", + "rpl_parallel_after_mark_start_commit SIGNAL t2_ready2")); + +--connection server_2 +SET DEBUG_SYNC= "now WAIT_FOR t2_ready1"; +# T2 has now started running, but has not yet done mark_start_commit() +SET DEBUG_SYNC= "now SIGNAL t1_cont1"; +SET DEBUG_SYNC= "now WAIT_FOR t1_ready2"; +# T1 has now done unmark_start_commit() in preparation for its retry. + +--connection server_1 +INSERT INTO t1 VALUES (52); +SET BINLOG_FORMAT= @old_format; +SELECT * FROM t2 WHERE a>=50 ORDER BY a; +SELECT * FROM t1 WHERE a>=50 ORDER BY a; + +--connection server_2 +# Let the preparation transaction complete, so that the same worker thread +# can continue with the transaction T3. +SET DEBUG_SYNC= "now SIGNAL prep_cont"; +SET DEBUG_SYNC= "now WAIT_FOR t3_ready"; +# T3 has now gone to wait for T2 to start committing +SET DEBUG_SYNC= "now SIGNAL t2_cont1"; +SET DEBUG_SYNC= "now WAIT_FOR t2_ready2"; +# T2 has now done mark_start_commit(). +# Let things run, and check that T3 does not get deadlocked. +SET DEBUG_SYNC= "now SIGNAL t1_cont2"; +--sync_with_master + +--connection server_1 +--save_master_pos +--connection server_2 +--sync_with_master +SELECT * FROM t2 WHERE a>=50 ORDER BY a; +SELECT * FROM t1 WHERE a>=50 ORDER BY a; +SET DEBUG_SYNC="reset"; + +# Re-spawn the worker threads to remove any DBUG injections or DEBUG_SYNC. +--source include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +--source include/start_slave.inc + + +--echo *** MDEV-7326 Server deadlock in connection with parallel replication *** +# Similar to the previous test, but with T2 and T3 in the same GCO. +# We use three transactions, T1 in one group commit and T2/T3 in another. +# T1 does mark_start_commit(), then gets a deadlock error. +# T2 wakes up and starts running +# T1 does unmark_start_commit() +# T3 goes to wait for T1 to start its commit +# T2 does mark_start_commit() +# The bug was that at this point, T3 got deadlocked. T2 increments the +# count_committing_event_groups but does not signal T3, as they are in +# the same GCO. Then later when T1 increments, it would also not signal +# T3, because now the count_committing_event_groups is not equal to the +# wait_count of T3 (it is one larger). + +--connection server_2 +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=3; +SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid"; +--source include/start_slave.inc + +--connection server_1 +SET @old_format= @@SESSION.binlog_format; +SET binlog_format= STATEMENT; +# This debug_sync will linger on and be used to control T3 later. +INSERT INTO t1 VALUES (foo(60, + "rpl_parallel_start_waiting_for_prior SIGNAL t3_ready", + "rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont")); +--save_master_pos +--connection server_2 +# Wait for the debug_sync point for T3 to be set. But let the preparation +# transaction remain hanging, so that T1 and T2 will be scheduled for the +# remaining two worker threads. +SET DEBUG_SYNC= "now WAIT_FOR prep_ready"; + +--connection server_1 +INSERT INTO t2 VALUES (foo(60, + "rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1", + "rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2")); +--save_master_pos + +--connection server_2 +SET DEBUG_SYNC= "now WAIT_FOR t1_ready1"; +# T1 has now done mark_start_commit(). It will later do a rollback and retry. + +# Do T2 and T3 in a single group commit. +# Use a MyISAM table for T2 and T3, so they do not trigger the +# rpl_parallel_simulate_temp_err_xid DBUG insertion on XID event. +--connection con_temp3 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +send INSERT INTO t1 VALUES (foo(61, + "rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1", + "rpl_parallel_after_mark_start_commit SIGNAL t2_ready2")); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued1'; + +--connection con_temp4 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +send INSERT INTO t6 VALUES (62); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='now SIGNAL master_cont1'; + +--connection con_temp3 +REAP; +--connection con_temp4 +REAP; + +--connection server_1 +SET debug_sync='RESET'; +SET BINLOG_FORMAT= @old_format; +SELECT * FROM t2 WHERE a>=60 ORDER BY a; +SELECT * FROM t1 WHERE a>=60 ORDER BY a; +SELECT * FROM t6 WHERE a>=60 ORDER BY a; + +--connection server_2 +SET DEBUG_SYNC= "now WAIT_FOR t2_ready1"; +# T2 has now started running, but has not yet done mark_start_commit() +SET DEBUG_SYNC= "now SIGNAL t1_cont1"; +SET DEBUG_SYNC= "now WAIT_FOR t1_ready2"; +# T1 has now done unmark_start_commit() in preparation for its retry. + +--connection server_2 +# Let the preparation transaction complete, so that the same worker thread +# can continue with the transaction T3. +SET DEBUG_SYNC= "now SIGNAL prep_cont"; +SET DEBUG_SYNC= "now WAIT_FOR t3_ready"; +# T3 has now gone to wait for T2 to start committing +SET DEBUG_SYNC= "now SIGNAL t2_cont1"; +SET DEBUG_SYNC= "now WAIT_FOR t2_ready2"; +# T2 has now done mark_start_commit(). +# Let things run, and check that T3 does not get deadlocked. +SET DEBUG_SYNC= "now SIGNAL t1_cont2"; +--sync_with_master + +--connection server_1 +--save_master_pos +--connection server_2 +--sync_with_master +SELECT * FROM t2 WHERE a>=60 ORDER BY a; +SELECT * FROM t1 WHERE a>=60 ORDER BY a; +SELECT * FROM t6 WHERE a>=60 ORDER BY a; +SET DEBUG_SYNC="reset"; + +# Re-spawn the worker threads to remove any DBUG injections or DEBUG_SYNC. +--source include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +--source include/start_slave.inc + + +# Clean up. --connection server_2 --source include/stop_slave.inc SET GLOBAL slave_parallel_threads=@old_parallel_threads; diff --git a/mysql-test/suite/rpl/t/rpl_parallel2.test b/mysql-test/suite/rpl/t/rpl_parallel2.test index 39b35063c7c..51c9e39a26a 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel2.test +++ b/mysql-test/suite/rpl/t/rpl_parallel2.test @@ -25,6 +25,13 @@ INSERT INTO t1 VALUES (1,sleep(2)); --connection server_2 --sync_with_master +# The slave position (which --sync_with_master waits for) is updated just +# before the Seconds_Behind_Master. So we have to wait for the zero status +# to appear, otherwise there is a small window between --sync_with_master +# and SHOW SLAVE STATUS where we can see a non-zero value. +--let $slave_param= Seconds_Behind_Master +--let $slave_param_value= 0 +--source include/wait_for_slave_param.inc --echo Seconds_Behind_Master should be zero here because the slave is fully caught up and idle. --let $status_items= Seconds_Behind_Master --source include/show_slave_status.inc diff --git a/mysql-test/suite/sys_vars/r/sql_log_bin_basic.result b/mysql-test/suite/sys_vars/r/sql_log_bin_basic.result index 5e8fe4e02f7..909c434340c 100644 --- a/mysql-test/suite/sys_vars/r/sql_log_bin_basic.result +++ b/mysql-test/suite/sys_vars/r/sql_log_bin_basic.result @@ -57,11 +57,16 @@ ERROR 42000: Variable 'sql_log_bin' can't be set to the value of '¹' SET @@session.sql_log_bin = NO; ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'NO' '#-------------------FN_DYNVARS_156_05----------------------------#' +SELECT @@global.sql_log_bin; +@@global.sql_log_bin +1 SET @@global.sql_log_bin = 0; +ERROR HY000: Variable 'sql_log_bin' is a SESSION variable SELECT @@global.sql_log_bin; @@global.sql_log_bin -0 +1 SET @@global.sql_log_bin = 1; +ERROR HY000: Variable 'sql_log_bin' is a SESSION variable '#----------------------FN_DYNVARS_156_06------------------------#' SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sql_log_bin'; count(VARIABLE_VALUE) diff --git a/mysql-test/suite/sys_vars/r/stored_program_cache_basic.result b/mysql-test/suite/sys_vars/r/stored_program_cache_basic.result index f1638520f72..7f882255567 100644 --- a/mysql-test/suite/sys_vars/r/stored_program_cache_basic.result +++ b/mysql-test/suite/sys_vars/r/stored_program_cache_basic.result @@ -23,7 +23,7 @@ Warnings: Warning 1292 Truncated incorrect stored_program_cache value: '-1' SELECT @@global.stored_program_cache; @@global.stored_program_cache -256 +0 SET @@global.stored_program_cache =100000000000; Warnings: Warning 1292 Truncated incorrect stored_program_cache value: '100000000000' @@ -31,11 +31,9 @@ SELECT @@global.stored_program_cache; @@global.stored_program_cache 524288 SET @@global.stored_program_cache = 0; -Warnings: -Warning 1292 Truncated incorrect stored_program_cache value: '0' SELECT @@global.stored_program_cache; @@global.stored_program_cache -256 +0 SET @@global.stored_program_cache = 10000.01; ERROR 42000: Incorrect argument type to variable 'stored_program_cache' SET @@global.stored_program_cache = ON; diff --git a/mysql-test/suite/sys_vars/r/stored_program_cache_func.result b/mysql-test/suite/sys_vars/r/stored_program_cache_func.result new file mode 100644 index 00000000000..11151847d6b --- /dev/null +++ b/mysql-test/suite/sys_vars/r/stored_program_cache_func.result @@ -0,0 +1,52 @@ +create procedure p1() select 1; +flush status; +show status like 'handler_read_key'; +Variable_name Value +Handler_read_key 0 +call p1; +1 +1 +show status like 'handler_read_key'; +Variable_name Value +Handler_read_key 1 +call p1; +1 +1 +show status like 'handler_read_key'; +Variable_name Value +Handler_read_key 1 +set global stored_program_cache=0; +call p1; +1 +1 +show status like 'handler_read_key'; +Variable_name Value +Handler_read_key 2 +call p1; +1 +1 +show status like 'handler_read_key'; +Variable_name Value +Handler_read_key 3 +drop procedure p1; +set global stored_program_cache=default; +create procedure pr(i int) begin +create table t1 (a int, b int); +if (i = 1) then alter table t1 drop a; +else alter table t1 drop b; +end if; +select * from t1; +drop table t1; +end | +call pr(1); +b +call pr(2); +ERROR 42S22: Unknown column 'test.t1.b' in 'field list' +drop table t1; +set global stored_program_cache=0; +call pr(1); +b +call pr(2); +a +drop procedure pr; +set global stored_program_cache=default; diff --git a/mysql-test/suite/sys_vars/t/sql_log_bin_basic.test b/mysql-test/suite/sys_vars/t/sql_log_bin_basic.test index 153a0be0b8f..5f5e3920862 100644 --- a/mysql-test/suite/sys_vars/t/sql_log_bin_basic.test +++ b/mysql-test/suite/sys_vars/t/sql_log_bin_basic.test @@ -109,11 +109,15 @@ SET @@session.sql_log_bin = NO; --echo '#-------------------FN_DYNVARS_156_05----------------------------#' ########################################################################### -# Test if accessing global sql_log_bin gives error # +# Test if setting global sql_log_bin gives error, # +# and there is no error on reading it. # ########################################################################### +SELECT @@global.sql_log_bin; +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR SET @@global.sql_log_bin = 0; SELECT @@global.sql_log_bin; +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR SET @@global.sql_log_bin = 1; --echo '#----------------------FN_DYNVARS_156_06------------------------#' diff --git a/mysql-test/suite/sys_vars/t/stored_program_cache_func.test b/mysql-test/suite/sys_vars/t/stored_program_cache_func.test new file mode 100644 index 00000000000..f85fc8eb1bf --- /dev/null +++ b/mysql-test/suite/sys_vars/t/stored_program_cache_func.test @@ -0,0 +1,43 @@ +create procedure p1() select 1; + +flush status; +show status like 'handler_read_key'; +call p1; +show status like 'handler_read_key'; +call p1; +show status like 'handler_read_key'; + +set global stored_program_cache=0; + +call p1; +show status like 'handler_read_key'; +call p1; +show status like 'handler_read_key'; + +drop procedure p1; +set global stored_program_cache=default; + +# Test for missing SP automatic reparsing. +# when MDEV-5816 is implemented, it should be removed. + +--delimiter | +create procedure pr(i int) begin + create table t1 (a int, b int); + if (i = 1) then alter table t1 drop a; + else alter table t1 drop b; + end if; + select * from t1; + drop table t1; +end | +--delimiter ; +call pr(1); +--error ER_BAD_FIELD_ERROR +call pr(2); +drop table t1; + +set global stored_program_cache=0; +call pr(1); +call pr(2); +drop procedure pr; +set global stored_program_cache=default; + diff --git a/mysql-test/t/change_user_notembedded.test b/mysql-test/t/change_user_notembedded.test index bf5d1956cd5..19421c6dd33 100644 --- a/mysql-test/t/change_user_notembedded.test +++ b/mysql-test/t/change_user_notembedded.test @@ -22,3 +22,5 @@ change_user; disconnect test; connection default; +--echo that's all + diff --git a/mysql-test/t/create_or_replace.test b/mysql-test/t/create_or_replace.test index 2bdd23c21f6..9e37950dbef 100644 --- a/mysql-test/t/create_or_replace.test +++ b/mysql-test/t/create_or_replace.test @@ -346,20 +346,26 @@ LOCK TABLE t1 WRITE; --let $con_id = `SELECT CONNECTION_ID()` --send CREATE OR REPLACE TABLE t1 LIKE tmp --connection default +let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist + WHERE state= 'Waiting for table metadata lock'; +--source include/wait_condition.inc --replace_result $con_id con_id --eval KILL QUERY $con_id --connection con1 ---error 0,ER_QUERY_INTERRUPTED +--error ER_QUERY_INTERRUPTED --reap --send CREATE OR REPLACE TABLE t1 (a int) --connection default +let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist + WHERE state= 'Waiting for table metadata lock'; +--source include/wait_condition.inc --replace_result $con_id con_id --eval KILL QUERY $con_id --connection con1 ---error 0,ER_QUERY_INTERRUPTED +--error ER_QUERY_INTERRUPTED --reap --disconnect con1 --connection default diff --git a/mysql-test/t/ctype_binary.test b/mysql-test/t/ctype_binary.test index 8b57854de83..4a2646d1db5 100644 --- a/mysql-test/t/ctype_binary.test +++ b/mysql-test/t/ctype_binary.test @@ -10,3 +10,15 @@ set names binary; --echo # --echo # End of 5.5 tests --echo # + + +--echo # +--echo # Start of 10.0 tests +--echo # + +SET NAMES binary; +--source include/ctype_like_cond_propagation.inc + +--echo # +--echo # End of 10.0 tests +--echo # diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test index 5da1534029b..336d8ca761d 100644 --- a/mysql-test/t/ctype_latin1.test +++ b/mysql-test/t/ctype_latin1.test @@ -210,6 +210,13 @@ set names latin1; let $ctype_unescape_combinations=selected; --source include/ctype_unescape.inc +SET NAMES latin1; +--source include/ctype_like_cond_propagation.inc + +SET NAMES latin1 COLLATE latin1_bin; +--source include/ctype_like_cond_propagation.inc + + --echo # --echo # MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion --echo # diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test index 79f163d7e5d..95008d83a38 100644 --- a/mysql-test/t/ctype_uca.test +++ b/mysql-test/t/ctype_uca.test @@ -571,6 +571,14 @@ SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci; --echo # --echo +SET NAMES utf8 COLLATE utf8_unicode_ci; +--source include/ctype_like_cond_propagation.inc +--source include/ctype_like_cond_propagation_utf8_german.inc + +SET NAMES utf8 COLLATE utf8_german2_ci; +--source include/ctype_like_cond_propagation.inc +--source include/ctype_like_cond_propagation_utf8_german.inc + --echo # --echo # MDEV-4929 Myanmar collation --echo # @@ -580,5 +588,24 @@ SET collation_connection=ucs2_myanmar_ci; --source include/ctype_myanmar.inc --echo # +--echo # MDEV-7366 SELECT 'a' = BINARY 'A' returns 1 (utf8 charset, utf8_unicode_ci collation) +--echo # +SET NAMES utf8 COLLATE utf8_unicode_ci; +SELECT 'a' = BINARY 'A'; +SELECT BINARY 'A' = 'a'; + +--echo # +--echo # Wrong result set for WHERE a='oe' COLLATE utf8_german2_ci AND a='oe' +--echo # +SET NAMES utf8 COLLATE utf8_german2_ci; +CREATE TABLE t1 (a CHAR(10) CHARACTER SET utf8); +INSERT INTO t1 VALUES ('ö'),('oe'); +SELECT * FROM t1 WHERE a='oe' AND a='oe' COLLATE utf8_german2_ci; +SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe'; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' AND a='oe' COLLATE utf8_german2_ci; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe'; +DROP TABLE t1; + +--echo # --echo # End of MariaDB-10.0 tests --echo # diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index d269fb35dfe..33d41e9bc4c 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -897,6 +897,12 @@ DROP TABLE t1; --echo # Start of 10.0 tests --echo # +SET NAMES latin1, collation_connection=ucs2_bin; +--source include/ctype_like_cond_propagation.inc +SET NAMES latin1, collation_connection=ucs2_general_ci; +--source include/ctype_like_cond_propagation.inc +SET NAMES latin1; + --echo # --echo # MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context --echo # diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index e02d5a915b7..1e9047cca8e 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -1658,6 +1658,13 @@ set max_sort_length=default; --echo # Start of 10.0 tests --echo # +SET NAMES utf8 COLLATE utf8_bin; +--source include/ctype_like_cond_propagation.inc +SET NAMES utf8; +--source include/ctype_like_cond_propagation.inc +--source include/ctype_like_cond_propagation_utf8_german.inc + + --echo # --echo # MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string) --echo # diff --git a/mysql-test/t/frm_bad_row_type-7333.test b/mysql-test/t/frm_bad_row_type-7333.test new file mode 100644 index 00000000000..5100a85cb22 --- /dev/null +++ b/mysql-test/t/frm_bad_row_type-7333.test @@ -0,0 +1,14 @@ +# +# MDEV-7333 "'show table status like 'table_name'" on tokudb table lead to MariaDB crash +# +let $datadir= `select @@datadir`; +call mtr.add_suppression("bad_row_type.frm: invalid value 11 for the field row_format"); +copy_file std_data/bad_row_type.MYD $datadir/test/bad_row_type.MYD; +copy_file std_data/bad_row_type.MYI $datadir/test/bad_row_type.MYI; +copy_file std_data/bad_row_type.frm $datadir/test/bad_row_type.frm; + +select * from bad_row_type; +show create table bad_row_type; +replace_column 12 x 13 x; +show table status like 'bad_row_type'; +drop table bad_row_type; diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index a3f488a8d1e..2b189765bbc 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1631,3 +1631,21 @@ CREATE TABLE t1 ( d DATE, t TIME ); INSERT INTO t1 VALUES ('2008-12-05','22:34:09'),('2005-03-27','14:26:02'); SELECT EXTRACT(DAY_MINUTE FROM GREATEST(t,d)), GREATEST(t,d) FROM t1; DROP TABLE t1; + + +--echo # +--echo # MDEV-7221 from_days fails after null value +--echo # +CREATE TABLE t1 ( + id INT(11) NOT NULL PRIMARY KEY, + date1 DATE NULL DEFAULT NULL +); +INSERT INTO t1 VALUES (12, '2011-05-12'); +INSERT INTO t1 VALUES (13, NULL); +INSERT INTO t1 VALUES (14, '2009-10-23'); +INSERT INTO t1 VALUES (15, '2014-10-30'); +INSERT INTO t1 VALUES (16, NULL); +INSERT INTO t1 VALUES (17, NULL); +INSERT INTO t1 VALUES (18, '2010-10-13'); +SELECT a.id,a.date1,FROM_DAYS(TO_DAYS(a.date1)-10) as date2, DATE_ADD(a.date1,INTERVAL -10 DAY),TO_DAYS(a.date1)-10 FROM t1 a ORDER BY a.id; +DROP TABLE t1; diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 35bd447e9ea..4b1cb82d0f9 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1664,6 +1664,21 @@ WHERE t1a.c1 = c2 GROUP BY i2; DROP TABLE t1,t2; +--echo # +--echo # MDEV-6855 +--echo # MIN(*) with subqueries with IS NOT NULL in WHERE clause crashed. +--echo # + +CREATE TABLE t1 (i INT, c VARCHAR(3), KEY(c,i)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (7,'foo'),(0,'bar'); + +CREATE TABLE t2 (j INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (0),(8),(1),(8),(9); + +SELECT MAX(i), c FROM t1 +WHERE c != 'qux' AND ( SELECT SUM(j) FROM t1, t2 ) IS NOT NULL GROUP BY c; +drop table t1,t2; + # # End of MariaDB 5.5 tests # diff --git a/mysql-test/t/group_by_innodb.test b/mysql-test/t/group_by_innodb.test index df213cc189f..75ee3d0802a 100644 --- a/mysql-test/t/group_by_innodb.test +++ b/mysql-test/t/group_by_innodb.test @@ -67,3 +67,22 @@ DROP TABLE t1; --echo End of 5.5 tests +--echo # +--echo # MDEV-5719: Wrong result with GROUP BY and LEFT OUTER JOIN +--echo # +CREATE TABLE t1 (oidGroup INT, oid INT PRIMARY KEY)ENGINE=INNODB; +INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4); + +CREATE TABLE t2 (oid INT PRIMARY KEY)ENGINE=INNODB; +INSERT INTO t2 VALUES (3); + +# Returns a value +SELECT a.oidGroup, a.oid, b.oid FROM t1 a LEFT JOIN t2 b ON +a.oid=b.oid WHERE a.oidGroup=1; + +SELECT a.oidGroup, a.oid, b.oid FROM t1 a LEFT JOIN t2 b ON +a.oid=b.oid WHERE a.oidGroup=1 GROUP BY a.oid; + +DROP TABLE t1, t2; + +--echo # End of tests diff --git a/mysql-test/t/insert_update_autoinc-7150.test b/mysql-test/t/insert_update_autoinc-7150.test new file mode 100644 index 00000000000..1229898b4aa --- /dev/null +++ b/mysql-test/t/insert_update_autoinc-7150.test @@ -0,0 +1,8 @@ +# +# MDEV-7150 Wrong auto increment values on INSERT .. ON DUPLICATE KEY UPDATE when the inserted columns include NULL in an auto-increment column +# +create table t1 (a int(10) auto_increment primary key, b int(11)); +insert t1 values (null,1); +insert t1 values (null,2), (1,-1), (null,3) on duplicate key update b=values(b); +select * from t1; +drop table t1; diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test index 86e56a8301b..d28e7c23a4c 100644 --- a/mysql-test/t/key_cache.test +++ b/mysql-test/t/key_cache.test @@ -301,8 +301,8 @@ select * from t2; update t1 set p=3 where p=1; update t2 set i=2 where i=1; ---replace_result 1804 KEY_BLOCKS_UNUSED 1801 KEY_BLOCKS_UNUSED 1663 KEY_BLOCKS_UNUSED 1782 KEY_BLOCKS_UNUSED -show status like 'key_%'; +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; --replace_column 7 # select * from information_schema.key_caches where segment_number is null; @@ -334,8 +334,8 @@ update t1 set p=3 where p=1; update t2 set i=2 where i=1; ---replace_result 1800 KEY_BLOCKS_UNUSED 1794 KEY_BLOCKS_UNUSED 1656 KEY_BLOCKS_UNUSED 1775 KEY_BLOCKS_UNUSED -show status like 'key_%'; +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +select variable_value < @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; --replace_column 7 # select * from information_schema.key_caches where segment_number is null; @@ -359,8 +359,8 @@ select * from t2; update t1 set p=3 where p=1; update t2 set i=2 where i=1; ---replace_result 1804 KEY_BLOCKS_UNUSED 1801 KEY_BLOCKS_UNUSED 1663 KEY_BLOCKS_UNUSED 1782 KEY_BLOCKS_UNUSED -show status like 'key_%'; +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +select variable_value = @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; --replace_column 7 # select * from information_schema.key_caches where segment_number is null; diff --git a/mysql-test/t/kill-2-master.opt b/mysql-test/t/kill-2-master.opt new file mode 100644 index 00000000000..ab6ca1731f5 --- /dev/null +++ b/mysql-test/t/kill-2-master.opt @@ -0,0 +1 @@ +--skip-name-resolve diff --git a/mysql-test/t/kill-2.test b/mysql-test/t/kill-2.test new file mode 100644 index 00000000000..0c1177722b4 --- /dev/null +++ b/mysql-test/t/kill-2.test @@ -0,0 +1,29 @@ +# +# Test KILL and KILL QUERY statements. +# +# Killing a connection in an embedded server does not work like in a normal +# server, if it is waiting for a new statement. In an embedded server, the +# connection does not read() from a socket, but returns control to the +# application. 'mysqltest' does not handle the kill request. +# + +-- source include/not_embedded.inc +-- source include/not_threadpool.inc + +--echo # +--echo # MDEV-6896 kill user command cause MariaDB crash! +--echo # + +create user foo@'127.0.0.1'; + +--connect (con1,127.0.0.1,foo,,) + +--connection default +select user from information_schema.processlist; +kill user foo@'127.0.0.1'; + +let $wait_condition= + select count(*) = 0 from information_schema.processlist + where user = "foo"; +--source include/wait_condition.inc +drop user foo@'127.0.0.1'; diff --git a/mysql-test/t/kill_processlist-6619.test b/mysql-test/t/kill_processlist-6619.test index 2333f02eac6..95af83be56d 100644 --- a/mysql-test/t/kill_processlist-6619.test +++ b/mysql-test/t/kill_processlist-6619.test @@ -2,16 +2,26 @@ # MDEV-6619 SHOW PROCESSLIST returns empty result set after KILL QUERY # --source include/not_embedded.inc +--source include/have_debug_sync.inc + --enable_connect_log --connect (con1,localhost,root,,) --let $con_id = `SELECT CONNECTION_ID()` --replace_column 1 # 3 # 6 # 7 # SHOW PROCESSLIST; +SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go'; +send SHOW PROCESSLIST; --connection default +# We must wait for the SHOW PROCESSLIST query to have started before sending +# the kill. Otherwise, the KILL may be lost since it is reset at the start of +# query execution. +SET DEBUG_SYNC='now WAIT_FOR ready'; --replace_result $con_id con_id eval KILL QUERY $con_id; +SET DEBUG_SYNC='now SIGNAL go'; --connection con1 --error ER_QUERY_INTERRUPTED -SHOW PROCESSLIST; +reap; +SET DEBUG_SYNC='reset'; --replace_column 1 # 3 # 6 # 7 # SHOW PROCESSLIST; diff --git a/mysql-test/t/kill_query-6728.test b/mysql-test/t/kill_query-6728.test new file mode 100644 index 00000000000..485256a65b6 --- /dev/null +++ b/mysql-test/t/kill_query-6728.test @@ -0,0 +1,14 @@ +# +# MDEV-6728 KILL QUERY executed on an idle connection can interrupt the next query +# +--enable_connect_log +--connect (con1,localhost,root,,) +let $id=`select connection_id()`; + +--connection default +--replace_result $id id +eval kill query $id; + +--connection con1 +select count(*) > 0 from mysql.user; + diff --git a/mysql-test/t/lock_sync.test b/mysql-test/t/lock_sync.test index f00080d917b..ef79cc2c0f4 100644 --- a/mysql-test/t/lock_sync.test +++ b/mysql-test/t/lock_sync.test @@ -1186,7 +1186,6 @@ DROP TABLE t1; disconnect con1; disconnect con2; - # Check that all connections opened by test cases in this file are really # gone so execution of other tests won't be affected by their presence. --source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index 8a2bd4cf6c1..6fd26ab2011 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -727,7 +727,8 @@ CREATE TABLE `db_17876.slow_log_data` ( `last_insert_id` int(11) default NULL, `insert_id` int(11) default NULL, `server_id` int(11) default NULL, - `sql_text` mediumtext + `sql_text` mediumtext, + `thread_id` bigint(21) unsigned default NULL ); CREATE TABLE `db_17876.general_log_data` ( diff --git a/mysql-test/t/mdev6830-master.opt b/mysql-test/t/mdev6830-master.opt new file mode 100644 index 00000000000..2a8c27d4731 --- /dev/null +++ b/mysql-test/t/mdev6830-master.opt @@ -0,0 +1 @@ +--debug diff --git a/mysql-test/t/mdev6830.test b/mysql-test/t/mdev6830.test new file mode 100644 index 00000000000..24565d04fed --- /dev/null +++ b/mysql-test/t/mdev6830.test @@ -0,0 +1,63 @@ + +--source include/have_debug.inc + +--disable_warnings +drop table if exists t1,t2,t3; +drop view if exists v2,v3; +--enable_warnings +CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; + +CREATE TABLE t2 ( + f1 DATE, + f2 VARCHAR(1024), + f3 VARCHAR(10), + f4 DATE, + f5 VARCHAR(10), + f6 VARCHAR(10), + f7 VARCHAR(10), + f8 DATETIME, + f9 INT, + f10 VARCHAR(1024), + f11 VARCHAR(1024), + f12 INT, + f13 VARCHAR(1024) +) ENGINE=MyISAM; + +CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2; + +CREATE TABLE t3 ( + f1 VARCHAR(1024), + f2 VARCHAR(1024), + f3 DATETIME, + f4 VARCHAR(10), + f5 INT, + f6 VARCHAR(10), + f7 VARCHAR(1024), + f8 VARCHAR(10), + f9 INT, + f10 DATE, + f11 INT, + f12 VARCHAR(1024), + f13 VARCHAR(10), + f14 DATE, + f15 DATETIME +) ENGINE=MyISAM; + +CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3; + +INSERT INTO t3 VALUES + ('FOO','foo','2000-08-04 00:00:00','one',1,'1','FOO','foo',1,'2004-05-09',1,'one','one','2001-12-07','2001-10-17 08:25:04'), + ('BAR','bar','2001-01-01 04:52:37','two',2,'2','BAR','bar',2,'2008-01-01',2,'two','two','2006-06-19','2002-01-01 08:22:49'); + +CREATE TABLE t4 (f1 VARCHAR(10), f2 INT) ENGINE=MyISAM; + +SELECT * FROM t1; + +--error ER_BAD_FIELD_ERROR +SELECT non_existing FROM v2; + +SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5; + +drop table t1,t2,t3,t4; +drop view v2,v3; + diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 1e2aacd474a..a74e95ab65b 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -581,7 +581,7 @@ CREATE INDEX i1 ON t1 (a); DROP TABLE t1; # Before the fix it should show extra file like #sql-2405_2.par ---list_files $MYSQLD_DATADIR/test/ * +--list_files $MYSQLD_DATADIR/test/ *.par --disable_parsing --echo # @@ -616,7 +616,7 @@ ALTER TABLE t1 REORGANIZE PARTITION pMAX INTO SHOW WARNINGS; #Contents of the 'test' database directory: ---list_files $MYSQLD_DATADIR/test +--list_files $MYSQLD_DATADIR/test/ *.par disconnect con1; connection default; diff --git a/mysql-test/t/partition_innodb_plugin.test b/mysql-test/t/partition_innodb_plugin.test index 2eb9a2fa2a0..8044ae9ec5c 100644 --- a/mysql-test/t/partition_innodb_plugin.test +++ b/mysql-test/t/partition_innodb_plugin.test @@ -52,7 +52,7 @@ KEY_BLOCK_SIZE=4 PARTITION BY HASH(id) PARTITIONS 1; --replace_result #p# #P# ---list_files $MYSQLD_DATADIR/test +--list_files $MYSQLD_DATADIR/test t1* SHOW CREATE TABLE t1; SET GLOBAL innodb_file_per_table = OFF; @@ -71,14 +71,14 @@ LOCK TABLE t1 WRITE; ALTER TABLE t1 ADD PARTITION PARTITIONS 1; --replace_result #p# #P# ---list_files $MYSQLD_DATADIR/test +--list_files $MYSQLD_DATADIR/test t1* --echo # This SET is not needed to reproduce the bug, --echo # it is here just to make the test case more realistic SET innodb_strict_mode = OFF; ALTER TABLE t1 ADD PARTITION PARTITIONS 2; --replace_result #p# #P# ---list_files $MYSQLD_DATADIR/test +--list_files $MYSQLD_DATADIR/test t1* # really bug#56172 ALTER TABLE t1 REBUILD PARTITION p0; diff --git a/mysql-test/t/processlist.test b/mysql-test/t/processlist.test index 9c555c0f9fb..a8f8a4ed64c 100644 --- a/mysql-test/t/processlist.test +++ b/mysql-test/t/processlist.test @@ -2,6 +2,7 @@ # MDEV-4578 information_schema.processlist reports incorrect value for Time (2147483647) # +source include/have_debug.inc; source include/have_debug_sync.inc; let $tid= `SELECT CONNECTION_ID()`; @@ -21,6 +22,7 @@ SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed'; connection con1; --replace_result $tid TID reap; +set debug_sync='reset'; connection default; # @@ -28,15 +30,13 @@ connection default; # connection con1; -# Trigger a signal once the thread has gone from "Query" to "Sleep" command -# state. Note we need to execute this twice: Once at the end of SET DEBUG_SYNC, -# and once for the intended time, at the end of SELECT SLEEP(). -SET DEBUG_SYNC = 'dispatch_command_end SIGNAL query_done EXECUTE 2'; -connection default; -# Wait for and clear the first signal set during SET DEBUG_SYNC. -SET DEBUG_SYNC= 'now WAIT_FOR query_done'; -SET DEBUG_SYNC= 'now SIGNAL nosignal'; -connection con1; +# This DBUG insertion triggers a DEBUG_SYNC signal "query_done" once +# the below SELECT SLEEP(5) has gone from "Query" to "Sleep" command +# state. (We cannot just set the DEBUG_SYNC directly here, because +# then it can trigger at the end of the SET DEBUG_SYNC statement (or +# at the end of the Prepare step of the SELECT, if --ps-protocol), +# thus occuring too early). +SET debug_dbug="+d,sleep_inject_query_done_debug_sync"; select sleep(5); #run a query that will take some time connection default; diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index d529dc415e7..88940eaf2b8 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -257,3 +257,23 @@ select sql_calc_found_rows 1 as res from t1 left join t2 on i1 = i2 where v2 = 5 select found_rows() as count; drop table t1, t2; +# +# MDEV-7219 SQL_CALC_FOUND_ROWS yields wrong result +# +create table t1 (i int, v varchar(64), key (i)); + +--disable_query_log +let $1=150; +while ($1) +{ + eval insert into t1 values ($1 % 2, 'foo'); + dec $1; +} +--enable_query_log + +select sql_calc_found_rows * from t1 where i = 0 order by v limit 59,2; +select found_rows(); +select sql_calc_found_rows * from t1 ignore index (i) where i = 0 order by v limit 59,2; +select found_rows(); +drop table t1; + diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 14d50709921..c43193d1b57 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -1210,33 +1210,8 @@ disconnect conn1; connection default; DROP USER test_u@localhost; - ---echo # ---echo # Bug #48985: show create table crashes if previous access to the table ---echo # was killed ---echo # - -connect(con1,localhost,root,,); -CONNECTION con1; -LET $ID= `SELECT connection_id()`; - -CONNECTION default; ---disable_query_log -eval KILL QUERY $ID; ---enable_query_log - -CONNECTION con1; ---error ER_QUERY_INTERRUPTED -SHOW CREATE TABLE non_existent; - -DISCONNECT con1; ---source include/wait_until_disconnected.inc -CONNECTION default; - - --echo End of 5.1 tests - --echo # --echo # Bug#52593 SHOW CREATE TABLE is blocked if table is locked --echo # for write by another connection diff --git a/mysql-test/t/sp-innodb.test b/mysql-test/t/sp-innodb.test new file mode 100644 index 00000000000..228ab42544d --- /dev/null +++ b/mysql-test/t/sp-innodb.test @@ -0,0 +1,45 @@ + +--source include/have_innodb.inc + +--disable_warnings +drop table if exists t1,t2; +drop procedure if exists p1; +--enable_warnings + +--echo # +--echo #MDEV-6985: MariaDB crashes on stored procedure call +--echo # +CREATE TABLE `t1` ( + `ID` int(11) NOT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB; + +CREATE TABLE `t2` ( + `ID` int(11) NOT NULL, + `DATE` datetime DEFAULT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB; + +--delimiter ;; + +CREATE PROCEDURE `p1`() +BEGIN + DECLARE _mySelect CURSOR FOR + SELECT DISTINCT t1.ID + FROM t1 + LEFT JOIN t2 AS t2 ON + t2.ID = t1.ID + AND t2.DATE = ( + SELECT MAX(T3.DATE) FROM t2 AS T3 WHERE T3.ID = t2.ID AND T3.DATE<=NOW() + ) + WHERE t1.ID = 1; + OPEN _mySelect; + CLOSE _mySelect; +END ;; +--delimiter ; + +CALL p1(); +CALL p1(); + +drop procedure p1; +drop table t1,t2; diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index dee6a7ee8f2..42a3dd193c4 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -374,6 +374,9 @@ CREATE VIEW v1 AS SELECT f1('a') FROM t1; --send SELECT * FROM v1 --connection default +let $wait_condition= + select count(*) = 2 from information_schema.processlist where state = "User sleep"; +--source include/wait_condition.inc --disable_query_log --eval KILL QUERY $ID_2 --eval KILL QUERY $ID_1 diff --git a/mysql-test/t/statistics_index_crash-7362.test b/mysql-test/t/statistics_index_crash-7362.test new file mode 100644 index 00000000000..3873b896dae --- /dev/null +++ b/mysql-test/t/statistics_index_crash-7362.test @@ -0,0 +1,30 @@ +# Test cases that cover the crashes within: +# MDEV-7362 ANALYZE TABLES crash with table-independent-statistics gathering +# MDEV-7380 engine-independent stats SEGV on ANALYZE TABLE (#2) + +--source include/have_stat_tables.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (a longtext, FULLTEXT KEY (`a`)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (unhex('3E0D0A4141414142334E7A6143317963324541414141424977414141674541726D')); +ANALYZE TABLE t1 PERSISTENT FOR ALL; +--sorted_result +SELECT * FROM mysql.index_stats WHERE index_name='a' AND table_name='t1'; +DROP TABLE t1; + +CREATE TABLE t1 (a longtext, FULLTEXT KEY (`a`)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (unhex('3E0D0A4141414142334E7A6143317963324541414141424977414141674541726D')); +ANALYZE TABLE t1 PERSISTENT FOR ALL; +--sorted_result +SELECT * FROM mysql.index_stats WHERE index_name='a' AND table_name='t1'; +DROP TABLE t1; + +CREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM; +INSERT INTO geom VALUES + (MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), + (MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), + (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))))); +ANALYZE TABLE geom PERSISTENT FOR ALL; +--sorted_result +SELECT * FROM mysql.index_stats WHERE index_name='g' AND table_name='geom'; +DROP TABLE geom; diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test index 1c17743e7f1..77ce8c595ca 100644 --- a/mysql-test/t/type_timestamp.test +++ b/mysql-test/t/type_timestamp.test @@ -446,3 +446,50 @@ SELECT MAX(dt) = '2011-01-06 12:34:30' FROM t1; DROP TABLE t1; --echo End of 5.5 tests + +--echo # +--echo # MDEV-7254: Assigned expression is evaluated twice when updating column TIMESTAMP NOT NULL +--echo # + +SET time_zone='+02:00'; +create table t1(value timestamp not null); +set @a:=0; +delimiter //; +create function f1 () returns timestamp +begin + set @a = @a + 1; + return NULL; +end// +delimiter ;// +set timestamp=12340; +insert t1 values (f1()); +select @a, value from t1; +set timestamp=12350; +update t1 set value = f1(); +select @a, value from t1; +drop table t1; +drop function f1; +set timestamp=0; + +# Verify no regressions to TIMESTAMP NULL +create table t1(value timestamp null); +set @a:=0; +delimiter //; +create function f1 () returns timestamp +begin + set @a = @a + 1; + return NULL; +end// +delimiter ;// +set timestamp=12340; +insert t1 values (f1()); +select @a, value from t1; +set timestamp=12350; +update t1 set value = f1(); +select @a, value from t1; +drop table t1; +drop function f1; +set timestamp=0; +SET time_zone=DEFAULT; + +--echo End of 10.0 tests diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index eb905b5c4df..ae78d5504cf 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -5335,6 +5335,16 @@ DROP FUNCTION f1; DROP VIEW v1; DROP TABLE t1, t2; + +create view v1 as select 1; + +--let $MYSQLD_DATADIR= `select @@datadir` +--let SEARCH_FILE= $MYSQLD_DATADIR/test/v1.frm +--let SEARCH_PATTERN=mariadb-version +--source include/search_pattern_in_file.inc + +drop view v1; + --echo # ----------------------------------------------------------------- --echo # -- End of 5.5 tests. --echo # ----------------------------------------------------------------- diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test index b7d31948d23..617daba6b8e 100644 --- a/mysql-test/t/windows.test +++ b/mysql-test/t/windows.test @@ -98,3 +98,19 @@ deallocate prepare abc; SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'socket'; + +--echo # +--echo # Bug#16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5 +--echo # + +# Creating a temporary text file. +--write_file $MYSQL_TMP_DIR/bug16581605.txt +abc +def +EOF + +#REPLACE.EXE UTILITY will work fine after the fix. +--exec $REPLACE abc xyz < $MYSQL_TMP_DIR/bug16581605.txt + +#Cleanup +remove_file $MYSQL_TMP_DIR/bug16581605.txt; |