diff options
Diffstat (limited to 'mysql-test')
197 files changed, 6155 insertions, 1865 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 231f30bb155..810bead1adc 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -25,6 +25,7 @@ test_SCRIPTS = mtr \ mysql-stress-test.pl nobase_test_DATA = \ + valgrind.supp \ lib/v1/mysql-test-run.pl \ lib/v1/mtr_cases.pl \ lib/v1/mtr_io.pl \ @@ -41,7 +42,6 @@ nobase_test_DATA = \ lib/v1/mtr_im.pl \ lib/v1/mtr_process.pl \ lib/v1/mtr_unique.pl \ -\ lib/mtr_cases.pm \ lib/mtr_gcov.pl \ lib/mtr_gprof.pl \ @@ -69,9 +69,8 @@ nobase_test_DATA = \ SUBDIRS = lib/My/SafeProcess EXTRA_DIST = README \ - valgrind.supp \ $(test_SCRIPTS) \ - $(nobase_test_DATA) + $(nobase_test_DATA) # List of directories containing test + result files and the # related test data files that should be copied @@ -93,7 +92,7 @@ TEST_DIRS = t r include std_data std_data/parts collections \ suite/jp suite/jp/t suite/jp/r suite/jp/std_data suite/jp/include \ suite/manual/t suite/manual/r \ suite/ndb_team suite/ndb_team/t suite/ndb_team/r \ - suite/rpl suite/rpl/data suite/rpl/include suite/rpl/r \ + suite/rpl suite/rpl/include suite/rpl/r \ suite/rpl/t \ suite/stress/include suite/stress/t suite/stress/r \ suite/ndb suite/ndb/t suite/ndb/r \ diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 103069f79cf..faa8ba110d3 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -1 +1,13 @@ funcs_1.charset_collation_1 # depends on compile-time decisions +binlog.binlog_tmp_table # Bug#45578: Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2' +main.ctype_gbk_binlog # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists +rpl.rpl_row_create_table # Bug#45576: rpl_row_create_table fails on PB2 +rpl.rpl_extraColmaster_myisam # Bug#46013: rpl_extraColmaster_myisam fails on pb2 +rpl.rpl_stm_reset_slave # Bug#46014: rpl_stm_reset_slave crashes the server sporadically in pb2 +rpl.rpl_extraCol_myisam # Bug#40796 +rpl.rpl_extraColmaster_innodb # Bug#40796 +rpl.rpl_extraCol_innodb # Bug#40796 +rpl_ndb.rpl_ndb_log # Bug#38998 +rpl.rpl_innodb_bug28430 # Bug#46029 +rpl.rpl_row_basic_3innodb # Bug#45243 +rpl.rpl_truncate_3innodb # Bug#46030 diff --git a/mysql-test/extra/rpl_tests/rpl_reset_slave.test b/mysql-test/extra/rpl_tests/rpl_reset_slave.test index 2cc041a35e1..1f88c792fce 100644 --- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test @@ -41,3 +41,57 @@ reset slave; start slave; sync_with_master; show status like 'slave_open_temp_tables'; + +# +#Bug#34654 RESET SLAVE does not clear LAST_IO_Err* +# + +# clearing the status +stop slave; +reset slave; +let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); +echo *** errno must be zero: $last_io_errno ***; + +# +# verifying start slave resets Last_IO_Error and Last_IO_Errno. +# + +change master to master_user='impossible_user_name'; +start slave; +source include/wait_for_slave_io_error.inc; +let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); +--disable_query_log +eval SELECT $last_io_errno > 0 as ONE; +--enable_query_log + +source include/stop_slave.inc; +change master to master_user='root'; +source include/start_slave.inc; +let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); +let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); +--echo *** last errno must be zero: $last_io_errno *** +--echo *** last error must be blank: $last_io_error *** + +# +# verifying reset slave resets Last_{IO,SQL}_Err{or,no} +# + +source include/stop_slave.inc; +change master to master_user='impossible_user_name'; +start slave; +source include/wait_for_slave_io_error.inc; +let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); +--disable_query_log +eval SELECT $last_io_errno > 0 as ONE; +--enable_query_log + +source include/stop_slave.inc; +reset slave; +let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); +let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); +let $last_sql_errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); +let $last_sql_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); +--echo *** io last errno must be zero: $last_io_errno *** +--echo *** io last error must be blank: $last_io_error *** +--echo *** sql last errno must be zero: $last_sql_errno *** +--echo *** sql last error must be blank: $last_sql_error *** diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index a4e7d9ae601..d412eae8364 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -669,13 +669,9 @@ call p_verify_status_increment(1, 0, 1, 0); insert t1 set a=3; call p_verify_status_increment(2, 2, 2, 2); savepoint a; -call p_verify_status_increment(0, 0, 0, 0); +call p_verify_status_increment(1, 0, 1, 0); insert t1 set a=4; ---echo # Binlog does not register itself this time for other than the 1st ---echo # statement of the transaction with MIXED/STATEMENT binlog_format. ---echo # It needs registering with the ROW format. Therefore 1,0,2,2 are ---echo # the correct arguments to this test after bug#40221 fixed. -call p_verify_status_increment(1, 0, 2, 2); +call p_verify_status_increment(2, 2, 2, 2); release savepoint a; rollback; call p_verify_status_increment(0, 0, 0, 0); diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc index 5837df67a75..d137b0957c0 100644 --- a/mysql-test/include/index_merge1.inc +++ b/mysql-test/include/index_merge1.inc @@ -527,4 +527,30 @@ where exists (select 1 from t2, t3 drop table t0, t1, t2, t3; +--echo # +--echo # BUG#44810: index merge and order by with low sort_buffer_size +--echo # crashes server! +--echo # +CREATE TABLE t1(a VARCHAR(128),b VARCHAR(128),KEY(A),KEY(B)); +INSERT INTO t1 VALUES (REPEAT('a',128),REPEAT('b',128)); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +SET SESSION sort_buffer_size=1; +EXPLAIN +SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%' + ORDER BY a,b; +# we don't actually care about the result : we're checking if it crashes +--disable_result_log +SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%' + ORDER BY a,b; +--enable_result_log + +SET SESSION sort_buffer_size=DEFAULT; +DROP TABLE t1; + + --echo End of 5.0 tests diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 303f896cdfe..6dabe4864a9 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -1171,6 +1171,16 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY COMMENT 'My ID#', f2 INTEGER DEFAULT NUL SHOW CREATE TABLE t1; DROP TABLE t1; +--echo # +--echo # Bug #36995: valgrind error in remove_const during subquery executions +--echo # + +create table t1 (a bit(1) not null,b int) engine=myisam; +create table t2 (c int) engine=innodb; +explain +select b from t1 where a not in (select b from t1,t2 group by a) group by a; +DROP TABLE t1,t2; + --echo End of 5.0 tests # Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY @@ -1488,43 +1498,12 @@ INSERT INTO t1 VALUES (4,1,3,'pk',NULL),(5,1,3,'c2',NULL), (2,1,4,'c_extra',NULL),(3,1,4,'c_extra',NULL); -EXPLAIN SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; +EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; -SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; +SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; DROP TABLE t1; -# -# Bug#21704: Renaming column does not update FK definition. -# - -# -# --disable_warnings -# DROP TABLE IF EXISTS t1; -# DROP TABLE IF EXISTS t2; -# --enable_warnings -# -# CREATE TABLE t1(id INT PRIMARY KEY) -# ENGINE=innodb; -# -# CREATE TABLE t2( -# t1_id INT PRIMARY KEY, -# CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id)) -# ENGINE=innodb; -# -# --echo -# -# --disable_result_log -# --error ER_ERROR_ON_RENAME -# ALTER TABLE t1 CHANGE id id2 INT; -# --enable_result_log -# -# --echo -# -# DROP TABLE t2; -# DROP TABLE t1; -# - --echo # --echo # Bug #44290: explain crashes for subquery with distinct in --echo # SQL_SELECT::test_quick_select diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 73287900f3c..b99402c8031 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -139,9 +139,9 @@ INSERT INTO global_suppressions VALUES ("Cannot find or open table test\/bug29807 from"), /* innodb foreign key tests that fail in ALTER or RENAME produce this */ - ("InnoDB: Error: in ALTER TABLE `test`.`t[12]`"), + ("InnoDB: Error: in ALTER TABLE `test`.`t[123]`"), ("InnoDB: Error: in RENAME TABLE table `test`.`t1`"), - ("InnoDB: Error: table `test`.`t[12]` does not exist in the InnoDB internal"), + ("InnoDB: Error: table `test`.`t[123]` does not exist in the InnoDB internal"), /* Test case for Bug#14233 produces the following warnings: */ ("Stored routine 'test'.'bug14233_1': invalid value in column mysql.proc"), diff --git a/mysql-test/include/no_valgrind_without_big.inc b/mysql-test/include/no_valgrind_without_big.inc new file mode 100644 index 00000000000..743e974daec --- /dev/null +++ b/mysql-test/include/no_valgrind_without_big.inc @@ -0,0 +1,12 @@ +# include/no_valgrind_without_big.inc +# +# If we are running with Valgrind ($VALGRIND_TEST <> 0) than the resource +# consumption (storage space needed, runtime ...) will be extreme. +# Therefore we require that the option "--big-test" is also set. +# + +if (`SELECT $VALGRIND_TEST <> 0 AND '$BIG_TEST' = ''`) +{ + --skip Need "--big-test" when running with Valgrind +} + diff --git a/mysql-test/include/wait_for_slave_io_error.inc b/mysql-test/include/wait_for_slave_io_error.inc new file mode 100644 index 00000000000..094406e02b2 --- /dev/null +++ b/mysql-test/include/wait_for_slave_io_error.inc @@ -0,0 +1,23 @@ +# ==== Purpose ==== +# +# Waits until the IO thread of the current connection has got an +# error, or until a timeout is reached. +# +# ==== Usage ==== +# +# source include/wait_for_slave_io_error.inc; +# +# Parameters to this macro are $slave_timeout and +# $slave_keep_connection. See wait_for_slave_param.inc for +# descriptions. + +let $old_slave_param_comparison= $slave_param_comparison; + +let $slave_param= Last_IO_Errno; +let $slave_param_comparison= !=; +let $slave_param_value= 0; +let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread; +source include/wait_for_slave_param.inc; +let $slave_error_message= ; + +let $slave_param_comparison= $old_slave_param_comparison; diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc index dc7b7da28c7..50c433b9b39 100644 --- a/mysql-test/lib/My/SafeProcess/safe_process.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process.cc @@ -89,7 +89,7 @@ static void die(const char* fmt, ...) } -static void kill_child (void) +static void kill_child(void) { int status= 0; @@ -119,7 +119,7 @@ static void kill_child (void) } -static void handle_abort (int sig) +extern "C" void handle_abort(int sig) { message("Got signal %d, child_pid: %d, sending ABRT", sig, child_pid); @@ -128,8 +128,8 @@ static void handle_abort (int sig) } } - -static void handle_signal (int sig) + +extern "C" void handle_signal(int sig) { message("Got signal %d, child_pid: %d", sig, child_pid); terminated= 1; @@ -152,7 +152,7 @@ int main(int argc, char* const argv[] ) pid_t own_pid= getpid(); pid_t parent_pid= getppid(); bool nocore = false; - + /* Install signal handlers */ signal(SIGTERM, handle_signal); signal(SIGINT, handle_signal); @@ -232,10 +232,11 @@ int main(int argc, char* const argv[] ) message("setrlimit failed, errno=%d", errno); } } - + // Signal that child is ready buf= 37; - write(pfd[1], &buf, 1); + if ((write(pfd[1], &buf, 1)) < 1) + die("Failed to signal that child is ready"); // Close write end close(pfd[1]); @@ -246,8 +247,10 @@ int main(int argc, char* const argv[] ) close(pfd[1]); // Close unused write end // Wait for child to signal it's ready - read(pfd[0], &buf, 1); - if(buf != 37) + if ((read(pfd[0], &buf, 1)) < 1) + die("Failed to read signal from child"); + + if (buf != 37) die("Didn't get 37 from pipe"); close(pfd[0]); // Close read end @@ -272,7 +275,7 @@ int main(int argc, char* const argv[] ) if (WIFEXITED(status)) { // Process has exited, collect return status - int ret_code= WEXITSTATUS(status); + ret_code= WEXITSTATUS(status); message("Child exit: %d", ret_code); // Exit with exit status of the child exit(ret_code); @@ -287,6 +290,6 @@ int main(int argc, char* const argv[] ) } kill_child(); - exit(1); + return 1; } diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 88bc572996b..1018ba31724 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -502,6 +502,9 @@ sub collect_one_suite($) next if ($test->{'name'} eq 'sys_vars.innodb_lock_wait_timeout_basic'); # Diff around innodb_thread_concurrency variable next if ($test->{'name'} eq 'sys_vars.innodb_thread_concurrency_basic'); + next if ($test->{'name'} eq 'main.innodb_bug42101-nonzero'); + next if ($test->{'name'} eq 'main.innodb_bug21704'); + next if ($test->{'name'} eq 'main.innodb_bug45357'); # Copy test options my $new_test= My::Test->new(); while (my ($key, $value) = each(%$test)) diff --git a/mysql-test/r/bug46080.result b/mysql-test/r/bug46080.result new file mode 100644 index 00000000000..18c7c22829a --- /dev/null +++ b/mysql-test/r/bug46080.result @@ -0,0 +1,14 @@ +# +# Bug #46080: group_concat(... order by) crashes server when +# sort_buffer_size cannot allocate +# +CREATE TABLE t1(a CHAR(255)); +INSERT INTO t1 VALUES ('a'); +SET @@SESSION.sort_buffer_size=5*16*1000000; +SET @@SESSION.max_heap_table_size=5*1000000; +# Must not crash. +SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a; +DROP TABLE t1; +SET @@SESSION.sort_buffer_size=default; +SET @@SESSION.max_heap_table_size=default; +End of 5.0 tests diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index de80dba47c1..cabd4c29c1d 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -766,15 +766,11 @@ call p_verify_status_increment(2, 2, 2, 2); SUCCESS savepoint a; -call p_verify_status_increment(0, 0, 0, 0); +call p_verify_status_increment(1, 0, 1, 0); SUCCESS insert t1 set a=4; -# Binlog does not register itself this time for other than the 1st -# statement of the transaction with MIXED/STATEMENT binlog_format. -# It needs registering with the ROW format. Therefore 1,0,2,2 are -# the correct arguments to this test after bug#40221 fixed. -call p_verify_status_increment(1, 0, 2, 2); +call p_verify_status_increment(2, 2, 2, 2); SUCCESS release savepoint a; diff --git a/mysql-test/r/ctype_cp932_binlog_row.result b/mysql-test/r/ctype_cp932_binlog_row.result index 0370b7a1cf6..cbac6b14669 100644 --- a/mysql-test/r/ctype_cp932_binlog_row.result +++ b/mysql-test/r/ctype_cp932_binlog_row.result @@ -9,10 +9,10 @@ EXECUTE stmt1 USING @var1; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT SELECT HEX(f1) FROM t1; HEX(f1) 8300 diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result index 2f67eb16b2e..044885d1ea7 100644 --- a/mysql-test/r/ctype_cp932_binlog_stm.result +++ b/mysql-test/r/ctype_cp932_binlog_stm.result @@ -9,7 +9,7 @@ EXECUTE stmt1 USING @var1; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES('ƒ\0') +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(0x8300) SELECT HEX(f1) FROM t1; HEX(f1) 8300 @@ -29,22 +29,22 @@ HEX(s1) HEX(s2) d 466F6F2773206120426172 ED40ED41ED42 47.93 DROP PROCEDURE bug18293| DROP TABLE t4| -SHOW BINLOG EVENTS FROM 369| +SHOW BINLOG EVENTS FROM 370| Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 369 Query 1 535 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1, +master-bin.000001 370 Query 1 536 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1, s2 CHAR(50) CHARACTER SET cp932, d DECIMAL(10,2)) -master-bin.000001 535 Query 1 784 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50), +master-bin.000001 536 Query 1 785 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50), IN ins2 CHAR(50) CHARACTER SET cp932, IN ind DECIMAL(10,2)) BEGIN INSERT INTO t4 VALUES (ins1, ins2, ind); END -master-bin.000001 784 Query 1 1048 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93)) -master-bin.000001 1048 Query 1 1137 use `test`; DROP PROCEDURE bug18293 -master-bin.000001 1137 Query 1 1216 use `test`; DROP TABLE t4 +master-bin.000001 785 Query 1 1049 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93)) +master-bin.000001 1049 Query 1 1138 use `test`; DROP PROCEDURE bug18293 +master-bin.000001 1138 Query 1 1217 use `test`; DROP TABLE t4 End of 5.0 tests -SHOW BINLOG EVENTS FROM 364; +SHOW BINLOG EVENTS FROM 365; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. CREATE TABLE t1 (a varchar(16)) character set cp932; diff --git a/mysql-test/r/ctype_gbk_binlog.result b/mysql-test/r/ctype_gbk_binlog.result new file mode 100644 index 00000000000..a49e170ff19 --- /dev/null +++ b/mysql-test/r/ctype_gbk_binlog.result @@ -0,0 +1,26 @@ +SET NAMES gbk; +CREATE TABLE t1 ( +f1 BLOB +) ENGINE=MyISAM DEFAULT CHARSET=gbk; +CREATE PROCEDURE p1(IN val BLOB) +BEGIN +SET @tval = val; +SET @sql_cmd = CONCAT_WS(' ', 'insert into t1(f1) values(?)'); +PREPARE stmt FROM @sql_cmd; +EXECUTE stmt USING @tval; +DEALLOCATE PREPARE stmt; +END| +SET @`tcontent`:=_binary 0x50434B000900000000000000E9000000 COLLATE `binary`/*!*/; +CALL p1(@`tcontent`); +FLUSH LOGS; +DROP PROCEDURE p1; +RENAME TABLE t1 to t2; +SELECT hex(f1) FROM t2; +hex(f1) +50434B000900000000000000E9000000 +SELECT hex(f1) FROM t1; +hex(f1) +50434B000900000000000000E9000000 +DROP PROCEDURE p1; +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/r/ctype_ldml.result b/mysql-test/r/ctype_ldml.result index 5dc9ea35cc3..711921eb526 100644 --- a/mysql-test/r/ctype_ldml.result +++ b/mysql-test/r/ctype_ldml.result @@ -40,6 +40,14 @@ abcd abcd efgh efgh ijkl ijkl DROP TABLE t1; +# +# Bug#43827 Server closes connections and restarts +# +CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci); +INSERT INTO t1 SELECT REPEAT('a',11); +Warnings: +Warning 1265 Data truncated for column 'c1' at row 1 +DROP TABLE t1; show collation like 'ucs2_vn_ci'; Collation Charset Id Default Compiled Sortlen ucs2_vn_ci ucs2 242 8 diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 306c51fb8cf..80f04ffd455 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -383,3 +383,21 @@ select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID; ID DATA FID drop table t1, t2; drop user mysqltest_1; +# End of 4.1 tests +SELECT 0 FROM +(SELECT 0) t01, (SELECT 0) t02, (SELECT 0) t03, (SELECT 0) t04, (SELECT 0) t05, +(SELECT 0) t06, (SELECT 0) t07, (SELECT 0) t08, (SELECT 0) t09, (SELECT 0) t10, +(SELECT 0) t11, (SELECT 0) t12, (SELECT 0) t13, (SELECT 0) t14, (SELECT 0) t15, +(SELECT 0) t16, (SELECT 0) t17, (SELECT 0) t18, (SELECT 0) t19, (SELECT 0) t20, +(SELECT 0) t21, (SELECT 0) t22, (SELECT 0) t23, (SELECT 0) t24, (SELECT 0) t25, +(SELECT 0) t26, (SELECT 0) t27, (SELECT 0) t28, (SELECT 0) t29, (SELECT 0) t30, +(SELECT 0) t31, (SELECT 0) t32, (SELECT 0) t33, (SELECT 0) t34, (SELECT 0) t35, +(SELECT 0) t36, (SELECT 0) t37, (SELECT 0) t38, (SELECT 0) t39, (SELECT 0) t40, +(SELECT 0) t41, (SELECT 0) t42, (SELECT 0) t43, (SELECT 0) t44, (SELECT 0) t45, +(SELECT 0) t46, (SELECT 0) t47, (SELECT 0) t48, (SELECT 0) t49, (SELECT 0) t50, +(SELECT 0) t51, (SELECT 0) t52, (SELECT 0) t53, (SELECT 0) t54, (SELECT 0) t55, +(SELECT 0) t56, (SELECT 0) t57, (SELECT 0) t58, (SELECT 0) t59, (SELECT 0) t60, +(SELECT 0) t61; +0 +0 +# End of 5.0 tests diff --git a/mysql-test/r/func_crypt.result b/mysql-test/r/func_crypt.result index 25b921681c5..c2f369b3941 100644 --- a/mysql-test/r/func_crypt.result +++ b/mysql-test/r/func_crypt.result @@ -95,3 +95,14 @@ Note 1003 select password('idkfa ') AS `password('idkfa ')`,old_password('idkfa' select encrypt('1234','_.'); encrypt('1234','_.') # +# +# Bug #44767: invalid memory reads in password() and old_password() +# functions +# +CREATE TABLE t1(c1 MEDIUMBLOB); +INSERT INTO t1 VALUES (REPEAT('a', 1024)); +SELECT OLD_PASSWORD(c1), PASSWORD(c1) FROM t1; +OLD_PASSWORD(c1) PASSWORD(c1) +77023ffe214c04ff *82E58A2C08AAFE72C8EB523069CD8ADB33F78F58 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 9bc83087232..fd7ef72409e 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -437,6 +437,13 @@ a ROUND(a) -1e+16 -10000000000000002 1e+16 10000000000000002 DROP TABLE t1; +CREATE TABLE t1(f1 LONGTEXT) engine=myisam; +INSERT INTO t1 VALUES ('a'); +SELECT 1 FROM (SELECT ROUND(f1) AS a FROM t1) AS s WHERE a LIKE 'a'; +1 +SELECT 1 FROM (SELECT ROUND(f1, f1) AS a FROM t1) AS s WHERE a LIKE 'a'; +1 +DROP TABLE t1; End of 5.0 tests SELECT 1e308 + 1e308; 1e308 + 1e308 diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result index ecdc35ac4cd..14ebc8203ec 100644 --- a/mysql-test/r/func_set.result +++ b/mysql-test/r/func_set.result @@ -146,3 +146,16 @@ NULL 0 0 drop table t1; +CREATE TABLE t1( a SET('a', 'b', 'c') ); +CREATE TABLE t2( a SET('a', 'b', 'c') ); +INSERT INTO t1 VALUES ('d'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t2 VALUES (''); +SELECT CONVERT( a USING latin1 ) FROM t1; +CONVERT( a USING latin1 ) + +SELECT CONVERT( a USING latin1 ) FROM t2; +CONVERT( a USING latin1 ) + +DROP TABLE t1, t2; diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 494b7a36532..a3708d06a1c 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -984,4 +984,52 @@ f4 geometry YES NULL f5 datetime YES NULL drop view v1; drop table t1; +SELECT MultiPoint(12345,''); +MultiPoint(12345,'') +NULL +SELECT MultiPoint(123451,''); +MultiPoint(123451,'') +NULL +SELECT MultiPoint(1234512,''); +MultiPoint(1234512,'') +NULL +SELECT MultiPoint(12345123,''); +MultiPoint(12345123,'') +NULL +SELECT MultiLineString(12345,''); +MultiLineString(12345,'') +NULL +SELECT MultiLineString(123451,''); +MultiLineString(123451,'') +NULL +SELECT MultiLineString(1234512,''); +MultiLineString(1234512,'') +NULL +SELECT MultiLineString(12345123,''); +MultiLineString(12345123,'') +NULL +SELECT LineString(12345,''); +LineString(12345,'') +NULL +SELECT LineString(123451,''); +LineString(123451,'') +NULL +SELECT LineString(1234512,''); +LineString(1234512,'') +NULL +SELECT LineString(12345123,''); +LineString(12345123,'') +NULL +SELECT Polygon(12345,''); +Polygon(12345,'') +NULL +SELECT Polygon(123451,''); +Polygon(123451,'') +NULL +SELECT Polygon(1234512,''); +Polygon(1234512,'') +NULL +SELECT Polygon(12345123,''); +Polygon(12345123,'') +NULL End of 5.1 tests diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index de80a83d538..a677d71b266 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1358,3 +1358,58 @@ DROP USER 'userbug33464'@'localhost'; USE test; DROP DATABASE dbbug33464; SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators; +CREATE USER user1; +CREATE USER user2; +GRANT CREATE ON db1.* TO 'user1'@'localhost'; +GRANT CREATE ROUTINE ON db1.* TO 'user1'@'localhost'; +GRANT CREATE ON db1.* TO 'user2'@'%'; +GRANT CREATE ROUTINE ON db1.* TO 'user2'@'%'; +FLUSH PRIVILEGES; +SHOW GRANTS FOR 'user1'@'localhost'; +Grants for user1@localhost +GRANT USAGE ON *.* TO 'user1'@'localhost' +GRANT CREATE, CREATE ROUTINE ON `db1`.* TO 'user1'@'localhost' +** Connect as user1 and create a procedure. +** The creation will imply implicitly assigned +** EXECUTE and ALTER ROUTINE privileges to +** the current user user1@localhost. +SELECT @@GLOBAL.sql_mode; +@@GLOBAL.sql_mode + +SELECT @@SESSION.sql_mode; +@@SESSION.sql_mode + +CREATE DATABASE db1; +CREATE PROCEDURE db1.proc1(p1 INT) +BEGIN +SET @x = 0; +REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT; +END ;|| +** Connect as user2 and create a procedure. +** Implicitly assignment of privileges will +** fail because the user2@localhost is an +** unknown user. +CREATE PROCEDURE db1.proc2(p1 INT) +BEGIN +SET @x = 0; +REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT; +END ;|| +Warnings: +Warning 1404 Failed to grant EXECUTE and ALTER ROUTINE privileges +SHOW GRANTS FOR 'user1'@'localhost'; +Grants for user1@localhost +GRANT USAGE ON *.* TO 'user1'@'localhost' +GRANT CREATE, CREATE ROUTINE ON `db1`.* TO 'user1'@'localhost' +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `db1`.`proc1` TO 'user1'@'localhost' +SHOW GRANTS FOR 'user2'; +Grants for user2@% +GRANT USAGE ON *.* TO 'user2'@'%' +GRANT CREATE, CREATE ROUTINE ON `db1`.* TO 'user2'@'%' +DROP PROCEDURE db1.proc1; +DROP PROCEDURE db1.proc2; +REVOKE ALL ON db1.* FROM 'user1'@'localhost'; +REVOKE ALL ON db1.* FROM 'user2'@'%'; +DROP USER 'user1'; +DROP USER 'user1'@'localhost'; +DROP USER 'user2'; +DROP DATABASE db1; diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index b17884c4f7a..27448d3e949 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -2462,4 +2462,43 @@ c 1 2 DROP TABLE t1; +# +# Bug #45386: Wrong query result with MIN function in field list, +# WHERE and GROUP BY clause +# +CREATE TABLE t (a INT, b INT, INDEX (a,b)); +INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1); +INSERT INTO t SELECT * FROM t; +# test MIN +#should use range with index for group by +EXPLAIN +SELECT a, MIN(b) FROM t WHERE b <> 0 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t range NULL a 10 NULL 9 Using where; Using index for group-by +#should return 1 row +SELECT a, MIN(b) FROM t WHERE b <> 0 GROUP BY a; +a MIN(b) +2 1 +# test MAX +#should use range with index for group by +EXPLAIN +SELECT a, MAX(b) FROM t WHERE b <> 1 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t range NULL a 10 NULL 9 Using where; Using index for group-by +#should return 1 row +SELECT a, MAX(b) FROM t WHERE b <> 1 GROUP BY a; +a MAX(b) +2 0 +# test 3 ranges and use the middle one +INSERT INTO t SELECT a, 2 FROM t; +#should use range with index for group by +EXPLAIN +SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t range NULL a 10 NULL 9 Using where; Using index for group-by +#should return 1 row +SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a; +a MAX(b) +2 1 +DROP TABLE t; End of 5.0 tests diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result index 8a935d87457..c639b20de91 100644 --- a/mysql-test/r/index_merge_myisam.result +++ b/mysql-test/r/index_merge_myisam.result @@ -557,6 +557,30 @@ a 1 2 drop table t0, t1, t2, t3; +# +# BUG#44810: index merge and order by with low sort_buffer_size +# crashes server! +# +CREATE TABLE t1(a VARCHAR(128),b VARCHAR(128),KEY(A),KEY(B)); +INSERT INTO t1 VALUES (REPEAT('a',128),REPEAT('b',128)); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +SET SESSION sort_buffer_size=1; +Warnings: +Warning 1292 Truncated incorrect sort_buffer_size value: '1' +EXPLAIN +SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%' +ORDER BY a,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge a,b a,b 131,131 NULL 64 Using sort_union(a,b); Using where; Using filesort +SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%' +ORDER BY a,b; +SET SESSION sort_buffer_size=DEFAULT; +DROP TABLE t1; End of 5.0 tests #---------------- ROR-index_merge tests ----------------------- SET SESSION STORAGE_ENGINE = MyISAM; diff --git a/mysql-test/r/innodb_bug21704.result b/mysql-test/r/innodb_bug21704.result new file mode 100644 index 00000000000..b8e0b15d50d --- /dev/null +++ b/mysql-test/r/innodb_bug21704.result @@ -0,0 +1,55 @@ +# +# Bug#21704: Renaming column does not update FK definition. +# + +# Test that it's not possible to rename columns participating in a +# foreign key (either in the referencing or referenced table). + +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB; +CREATE TABLE t2 (a INT PRIMARY KEY, b INT, +CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a)) +ROW_FORMAT=COMPACT ENGINE=INNODB; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT, +CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a)) +ROW_FORMAT=COMPACT ENGINE=INNODB; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +INSERT INTO t2 VALUES (1,1),(2,2),(3,3); +INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3); + +# Test renaming the column in the referenced table. + +ALTER TABLE t1 CHANGE a c INT; +ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150) +# Ensure that online column rename works. +ALTER TABLE t1 CHANGE b c INT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 + +# Test renaming the column in the referencing table + +ALTER TABLE t2 CHANGE a c INT; +ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150) +# Ensure that online column rename works. +ALTER TABLE t2 CHANGE b c INT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 + +# Test with self-referential constraints + +ALTER TABLE t3 CHANGE a d INT; +ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150) +ALTER TABLE t3 CHANGE b d INT; +ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150) +# Ensure that online column rename works. +ALTER TABLE t3 CHANGE c d INT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 + +# Cleanup. + +DROP TABLE t3; +DROP TABLE t2; +DROP TABLE t1; diff --git a/mysql-test/r/innodb_bug40565.result b/mysql-test/r/innodb_bug40565.result new file mode 100644 index 00000000000..21e923d9336 --- /dev/null +++ b/mysql-test/r/innodb_bug40565.result @@ -0,0 +1,9 @@ +create table bug40565(value decimal(4,2)) engine=innodb; +insert into bug40565 values (1), (null); +update bug40565 set value=NULL; +affected rows: 1 +info: Rows matched: 2 Changed: 1 Warnings: 0 +update bug40565 set value=NULL; +affected rows: 0 +info: Rows matched: 2 Changed: 0 Warnings: 0 +drop table bug40565; diff --git a/mysql-test/r/innodb_bug42101-nonzero.result b/mysql-test/r/innodb_bug42101-nonzero.result index 8a14296381c..277dfffdd35 100644 --- a/mysql-test/r/innodb_bug42101-nonzero.result +++ b/mysql-test/r/innodb_bug42101-nonzero.result @@ -11,11 +11,15 @@ set global innodb_commit_concurrency=42; select @@innodb_commit_concurrency; @@innodb_commit_concurrency 42 +set global innodb_commit_concurrency=DEFAULT; +select @@innodb_commit_concurrency; +@@innodb_commit_concurrency +1 set global innodb_commit_concurrency=0; ERROR HY000: Incorrect arguments to SET select @@innodb_commit_concurrency; @@innodb_commit_concurrency -42 +1 set global innodb_commit_concurrency=1; select @@innodb_commit_concurrency; @@innodb_commit_concurrency diff --git a/mysql-test/r/innodb_bug42101.result b/mysql-test/r/innodb_bug42101.result index 9a9c8e0ce9b..805097ffe9d 100644 --- a/mysql-test/r/innodb_bug42101.result +++ b/mysql-test/r/innodb_bug42101.result @@ -16,3 +16,7 @@ set global innodb_commit_concurrency=0; select @@innodb_commit_concurrency; @@innodb_commit_concurrency 0 +set global innodb_commit_concurrency=DEFAULT; +select @@innodb_commit_concurrency; +@@innodb_commit_concurrency +0 diff --git a/mysql-test/r/innodb_bug45357.result b/mysql-test/r/innodb_bug45357.result new file mode 100644 index 00000000000..7adeff2062f --- /dev/null +++ b/mysql-test/r/innodb_bug45357.result @@ -0,0 +1,7 @@ +set session transaction isolation level read committed; +create table bug45357(a int, b int,key(b))engine=innodb; +insert into bug45357 values (25170,6122); +update bug45357 set a=1 where b=30131; +delete from bug45357 where b < 20996; +delete from bug45357 where b < 7001; +drop table bug45357; diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 83a2a2111d5..3ff5f04b6c6 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1420,6 +1420,18 @@ t1 CREATE TABLE `t1` ( CONSTRAINT `f2_ref` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# Bug #36995: valgrind error in remove_const during subquery executions +# +create table t1 (a bit(1) not null,b int) engine=myisam; +create table t2 (c int) engine=innodb; +explain +select b from t1 where a not in (select b from t1,t2 group by a) group by a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 +DROP TABLE t1,t2; End of 5.0 tests CREATE TABLE `t2` ( `k` int(11) NOT NULL auto_increment, @@ -1689,10 +1701,10 @@ INSERT INTO t1 VALUES (4,1,2,'c2',NULL),(5,1,2,'c1',NULL),(2,1,3,'c2',NULL),(3,1,3,'c2',NULL), (4,1,3,'pk',NULL),(5,1,3,'c2',NULL), (2,1,4,'c_extra',NULL),(3,1,4,'c_extra',NULL); -EXPLAIN SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; +EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index vid PRIMARY 12 NULL 16 Using where -SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; +1 SIMPLE t1 index NULL PRIMARY 12 NULL 16 Using where +SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; vid tid idx name type 3 1 4 c_extra NULL 3 1 3 c2 NULL @@ -2108,4 +2120,92 @@ a b 4 14 5 5 DROP TABLE t1, t2, t3, t4; +# +# Bug#44886: SIGSEGV in test_if_skip_sort_order() - +# uninitialized variable used as subscript +# +CREATE TABLE t1 (a INT, b INT, c INT, d INT, PRIMARY KEY (b), KEY (a,c)) +ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1,1,0); +CREATE TABLE t2 (a INT, b INT, e INT, KEY (e)) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1,1,2); +CREATE TABLE t3 (a INT, b INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (1, 1); +SELECT * FROM t1, t2, t3 +WHERE t1.a = t3.a AND (t1.b = t3.b OR t1.d) AND t2.b = t1.b AND t2.e = 2 +GROUP BY t1.b; +a b c d a b e a b +1 1 1 0 1 1 2 1 1 +DROP TABLE t1, t2, t3; +# +# Bug #45828: Optimizer won't use partial primary key if another +# index can prevent filesort +# +CREATE TABLE `t1` ( +c1 int NOT NULL, +c2 int NOT NULL, +c3 int NOT NULL, +PRIMARY KEY (c1,c2), +KEY (c3) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES (5,2,1246276747); +INSERT INTO t1 VALUES (2,1,1246281721); +INSERT INTO t1 VALUES (7,3,1246281756); +INSERT INTO t1 VALUES (4,2,1246282139); +INSERT INTO t1 VALUES (3,1,1246282230); +INSERT INTO t1 VALUES (1,0,1246282712); +INSERT INTO t1 VALUES (8,3,1246282765); +INSERT INTO t1 SELECT c1+10,c2+10,c3+10 FROM t1; +INSERT INTO t1 SELECT c1+100,c2+100,c3+100 from t1; +INSERT INTO t1 SELECT c1+1000,c2+1000,c3+1000 from t1; +INSERT INTO t1 SELECT c1+10000,c2+10000,c3+10000 from t1; +INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1; +INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1; +SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3; +c1 c2 c3 +EXPLAIN SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref PRIMARY,c3 PRIMARY 4 const 1 Using where; Using filesort +EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref PRIMARY PRIMARY 4 const 1 Using where; Using filesort +CREATE TABLE t2 ( +c1 int NOT NULL, +c2 int NOT NULL, +c3 int NOT NULL, +KEY (c1,c2), +KEY (c3) +) ENGINE=InnoDB; +explain SELECT * FROM t2 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ref c1,c3 c1 4 const 1 Using where; Using filesort +DROP TABLE t1,t2; +# +# 36259: Optimizing with ORDER BY +# +CREATE TABLE t1 ( +a INT NOT NULL AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL, +d VARCHAR(5), +e INT NOT NULL, +PRIMARY KEY (a), KEY i2 (b,c,d) +) ENGINE=InnoDB; +INSERT INTO t1 (b,c,d,e) VALUES (1,1,'a',1), (2,2,'b',2); +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i2 i2 8 const,const 1 Using where; Using filesort +EXPLAIN SELECT * FROM t1 FORCE INDEX(i2) WHERE b=1 and c=1 ORDER BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i2 i2 8 const,const 1 Using where; Using filesort +EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 128 Using where +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/r/log_tables_debug.result b/mysql-test/r/log_tables_debug.result new file mode 100644 index 00000000000..daedb8c103a --- /dev/null +++ b/mysql-test/r/log_tables_debug.result @@ -0,0 +1,24 @@ +SET @old_general_log= @@global.general_log; +SET @old_general_log_file= @@global.general_log_file; +SET @old_slow_query_log= @@global.slow_query_log; +SET @old_slow_query_log_file= @@global.slow_query_log_file; +# +# Bug#45387 Information about statement id for prepared +# statements missed from general log +# +SET @@global.general_log = ON; +SET @@global.general_log_file = 'bug45387_general.log'; +SET SESSION debug='+d,reset_log_last_time'; +FLUSH LOGS; +SET @@global.general_log = @old_general_log; +SET @@global.general_log_file = @old_general_log_file; +SET SESSION debug='-d'; +Bug#45387: ID match. +End of 5.1 tests +# +# Cleanup +# +SET global general_log = @old_general_log; +SET global general_log_file = @old_general_log_file; +SET global slow_query_log = @old_slow_query_log; +SET global slow_query_log_file = @old_slow_query_log_file; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index f53b328d14e..bf9108459d7 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -2127,4 +2127,18 @@ SELECT * FROM m1; ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist DROP VIEW v1; DROP TABLE m1, t1; +# +# Bug #45796: invalid memory reads and writes when altering merge and +# base tables +# +CREATE TABLE t1(c1 INT) ENGINE=MyISAM; +CREATE TABLE m1(c1 INT) ENGINE=MERGE UNION=(t1); +ALTER TABLE m1 ADD INDEX idx_c1(c1); +SELECT * FROM m1; +ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist +ALTER TABLE t1 ADD INDEX idx_c1(c1); +SELECT * FROM m1; +c1 +DROP TABLE m1; +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/r/mysql-bug45236.result b/mysql-test/r/mysql-bug45236.result new file mode 100644 index 00000000000..cefcb1d314c --- /dev/null +++ b/mysql-test/r/mysql-bug45236.result @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS t1; +SET @old_max_allowed_packet= @@global.max_allowed_packet; +SET @@global.max_allowed_packet = 1024 * 1024 + 1024; +CREATE TABLE t1(data LONGBLOB); +INSERT INTO t1 SELECT CONCAT(REPEAT('1', 1024*1024 - 27), +"\'\r dummydb dummyhost"); +DROP TABLE t1; +SET @@global.max_allowed_packet = @old_max_allowed_packet; diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index a04eb1ca1aa..e704f81e187 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -198,6 +198,7 @@ COUNT (*) 1 COUNT (*) 1 +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) End of 5.0 tests WARNING: --server-arg option not supported in this configuration. Warning (Code 1286): Unknown table engine 'nonexistent' diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index c97131563cb..2f8e0ce5ec1 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3563,9 +3563,6 @@ grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; drop table t1; drop user mysqltest_1@localhost; # -# Bug#21527 mysqldump incorrectly tries to LOCK TABLES on the -# information_schema database. -# # Bug#21424 mysqldump failing to export/import views # create database mysqldump_myDB; @@ -3605,6 +3602,39 @@ drop user myDB_User@localhost; drop database mysqldump_myDB; use test; # +# Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the +# information_schema database. +# +# Bug #33762: mysqldump can not dump INFORMATION_SCHEMA +# +DROP TABLE IF EXISTS `TABLES`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TEMPORARY TABLE `TABLES` ( + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', + `ENGINE` varchar(64) DEFAULT NULL, + `VERSION` bigint(21) unsigned DEFAULT NULL, + `ROW_FORMAT` varchar(10) DEFAULT NULL, + `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, + `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `MAX_DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_FREE` bigint(21) unsigned DEFAULT NULL, + `AUTO_INCREMENT` bigint(21) unsigned DEFAULT NULL, + `CREATE_TIME` datetime DEFAULT NULL, + `UPDATE_TIME` datetime DEFAULT NULL, + `CHECK_TIME` datetime DEFAULT NULL, + `TABLE_COLLATION` varchar(32) DEFAULT NULL, + `CHECKSUM` bigint(21) unsigned DEFAULT NULL, + `CREATE_OPTIONS` varchar(255) DEFAULT NULL, + `TABLE_COMMENT` varchar(80) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +# # Bug#19745 mysqldump --xml produces invalid xml # DROP TABLE IF EXISTS t1; @@ -4006,6 +4036,181 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; DROP TABLE t1; +create table t1 (a text , b text); +create table t2 (a text , b text); +insert t1 values ("Duck, Duck", "goose"); +insert t1 values ("Duck, Duck", "pidgeon"); +insert t2 values ("We the people", "in order to perform"); +insert t2 values ("a more perfect", "union"); +select * from t1; +a b +Duck, Duck goose +Duck, Duck pidgeon +select * from t2; +a b +We the people in order to perform +a more perfect union +test.t1: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 +test.t2: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 +select * from t1; +a b +Duck, Duck goose +Duck, Duck pidgeon +Duck, Duck goose +Duck, Duck pidgeon +select * from t2; +a b +We the people in order to perform +a more perfect union +We the people in order to perform +a more perfect union +create table words(a varchar(255)); +create table words2(b varchar(255)); +select * from t1; +a b +Duck, Duck goose +Duck, Duck pidgeon +Duck, Duck goose +Duck, Duck pidgeon +Duck, Duck goose +Duck, Duck pidgeon +select * from t2; +a b +We the people in order to perform +a more perfect union +We the people in order to perform +a more perfect union +We the people in order to perform +a more perfect union +select * from words; +a +Aarhus +Aaron +Ababa +aback +abaft +abandon +abandoned +abandoning +abandonment +abandons +Aarhus +Aaron +Ababa +aback +abaft +abandon +abandoned +abandoning +abandonment +abandons +abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration +select * from words2; +b +abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration +drop table words; +mysql-import: Error: 1146, Table 'test.words' doesn't exist, when using table: words +drop table t1; +drop table t2; +drop table words2; # # Bug#16853 mysqldump doesn't show events # @@ -4226,6 +4431,57 @@ DROP DATABASE mysqldump_test_db; # -- End of test case for Bug#32538. SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT; + +Bug #34861 - mysqldump with --tab gives weird output for triggers. + +CREATE TABLE t1 (f1 INT); +CREATE TRIGGER tr1 BEFORE UPDATE ON t1 FOR EACH ROW SET @f1 = 1; +CREATE PROCEDURE pr1 () SELECT "Meow"; +CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT "Meow"; + +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +tr1 UPDATE t1 SET @f1 = 1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +test ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +SELECT name,body FROM mysql.proc WHERE NAME = 'pr1'; +name body +pr1 SELECT "Meow" + +dump table; if anything goes to stdout, it ends up here: --------------- + +drop everything +DROP EVENT ev1; +DROP TRIGGER tr1; +DROP TABLE t1; +DROP PROCEDURE pr1; + +reload table; this should restore table and trigger +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +tr1 UPDATE t1 SET @f1 = 1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +SELECT name,body FROM mysql.proc WHERE NAME = 'pr1'; +name body + +reload db; this should restore routines and events +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +tr1 UPDATE t1 SET @f1 = 1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +test ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +SELECT name,body FROM mysql.proc WHERE NAME = 'pr1'; +name body +pr1 SELECT "Meow" + +cleanup +DROP EVENT IF EXISTS ev1; +DROP PROCEDURE IF EXISTS pr1; +DROP TRIGGER IF EXISTS tr1; +DROP TABLE IF EXISTS t1; # # End of 5.1 tests # diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index f69ba522a9c..8e3fbde1ea8 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1924,5 +1924,72 @@ EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a>=200; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p2,p3 ALL NULL NULL NULL NULL 3 Using where DROP TABLE t1; +CREATE TABLE t1 ( a INT, b INT, c INT, KEY bc(b, c) ) +PARTITION BY KEY (a, b) PARTITIONS 3 +; +INSERT INTO t1 VALUES +(17, 1, -8), +(3, 1, -7), +(23, 1, -6), +(22, 1, -5), +(11, 1, -4), +(21, 1, -3), +(19, 1, -2), +(30, 1, -1), +(20, 1, 1), +(16, 1, 2), +(18, 1, 3), +(9, 1, 4), +(15, 1, 5), +(28, 1, 6), +(29, 1, 7), +(25, 1, 8), +(10, 1, 9), +(13, 1, 10), +(27, 1, 11), +(24, 1, 12), +(12, 1, 13), +(26, 1, 14), +(14, 1, 15) +; +SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c; +b c +1 -8 +1 -7 +1 -6 +1 -5 +1 -4 +1 -3 +1 -2 +1 -1 +1 1 +1 2 +1 3 +1 4 +1 5 +1 6 +1 7 +1 8 +1 9 +1 10 +1 11 +1 12 +1 13 +1 14 +1 15 +EXPLAIN +SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range bc bc 10 NULL 7 Using where; Using index for group-by +DROP TABLE t1; +# +# Bug #45807: crash accessing partitioned table and sql_mode +# contains ONLY_FULL_GROUP_BY +# +SET SESSION SQL_MODE='ONLY_FULL_GROUP_BY'; +CREATE TABLE t1(id INT,KEY(id)) ENGINE=MYISAM +PARTITION BY HASH(id) PARTITIONS 2; +DROP TABLE t1; +SET SESSION SQL_MODE=DEFAULT; End of 5.1 tests SET @@global.general_log= @old_general_log; diff --git a/mysql-test/r/query_cache_debug.result b/mysql-test/r/query_cache_debug.result index b03a71d3fec..eb59e62c8ba 100644 --- a/mysql-test/r/query_cache_debug.result +++ b/mysql-test/r/query_cache_debug.result @@ -71,3 +71,111 @@ DROP TABLE t1,t2; SET GLOBAL concurrent_insert= DEFAULT; SET GLOBAL query_cache_size= DEFAULT; SET GLOBAL query_cache_type= DEFAULT; +# +# Bug43758 Query cache can lock up threads in 'freeing items' state +# +FLUSH STATUS; +SET GLOBAL query_cache_type=DEMAND; +SET GLOBAL query_cache_size= 1024*768; +DROP TABLE IF EXISTS t1,t2,t3,t4,t5; +CREATE TABLE t1 (a VARCHAR(100)); +CREATE TABLE t2 (a VARCHAR(100)); +CREATE TABLE t3 (a VARCHAR(100)); +CREATE TABLE t4 (a VARCHAR(100)); +CREATE TABLE t5 (a VARCHAR(100)); +INSERT INTO t1 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +INSERT INTO t2 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +INSERT INTO t3 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +INSERT INTO t4 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +INSERT INTO t5 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +=================================== Connection thd1 +** +** Load Query Cache with a result set and one table. +** +SELECT SQL_CACHE * FROM t1; +a +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +************************************************************************* +** We want to accomplish the following state: +** - Query cache status: TABLE_FLUSH_IN_PROGRESS +** - THD1: invalidate_table_internal (iterating query blocks) +** - THD2: query_cache_insert (cond_wait) +** - THD3: query_cache_insert (cond_wait) +** - No thread should be holding the structure_guard_mutex. +** +** First step is to place a DELETE-statement on the debug hook just +** before the mutex lock in invalidate_table_internal. +** This will allow new result sets to be written into the QC. +** +SET SESSION debug='+d,wait_in_query_cache_invalidate1'; +SET SESSION debug='+d,wait_in_query_cache_invalidate2'; +DELETE FROM t1 WHERE a like '%a%';; +=================================== Connection default +** Assert that the expect process status is obtained. +** +=================================== Connection thd2 +** On THD2: Insert a result into the cache. This attempt will be blocked +** because of a debug hook placed just before the mutex lock after which +** the first part of the result set is written. +SET SESSION debug='+d,wait_in_query_cache_insert'; +SELECT SQL_CACHE * FROM t2 UNION SELECT * FROM t3; +=================================== Connection thd3 +** On THD3: Insert another result into the cache and block on the same +** debug hook. +SET SESSION debug='+d,wait_in_query_cache_insert'; +SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;; +=================================== Connection default +** Assert that the two SELECT-stmt threads to reach the hook. +** +** +** Signal the DELETE thread, THD1, to continue. It will enter the mutex +** lock and set query cache status to TABLE_FLUSH_IN_PROGRESS and then +** unlock the mutex before stopping on the next debug hook. +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate1' LIMIT 1 INTO @flush_thread_id; +KILL QUERY @flush_thread_id; +** Assert that we reach the next debug hook. +** +** Signal the remaining debug hooks blocking THD2 and THD3. +** The threads will grab the guard mutex enter the wait condition and +** and finally release the mutex. The threads will continue to wait +** until a broadcast signal reaches them causing both threads to +** come alive and check the condition. +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id ASC LIMIT 1 INTO @thread_id; +KILL QUERY @thread_id; +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id DESC LIMIT 1 INTO @thread_id; +KILL QUERY @thread_id; +** +** Finally signal the DELETE statement on THD1 one last time. +** The stmt will complete the query cache invalidation and return +** cache status to NO_FLUSH_IN_PROGRESS. On the status change +** One signal will be sent to the thread group waiting for executing +** invalidations and a broadcast signal will be sent to the thread +** group holding result set writers. +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate2' LIMIT 1 INTO @flush_thread_id; +KILL QUERY @flush_thread_id; +** +************************************************************************* +** No tables should be locked +=================================== Connection thd2 +a +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +DELETE FROM t1; +DELETE FROM t2; +DELETE FROM t3; +=================================== Connection thd3 +a +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +DELETE FROM t4; +DELETE FROM t5; +=================================== Connection thd1 +** Done. +SET GLOBAL query_cache_size= 0; +# Restore defaults +RESET QUERY CACHE; +FLUSH STATUS; +DROP TABLE t1,t2,t3,t4,t5; +SET GLOBAL query_cache_size= DEFAULT; +SET GLOBAL query_cache_type= DEFAULT; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 09c7d1b329d..50b5c3c13fb 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4457,4 +4457,83 @@ id select_type table type possible_keys key key_len ref rows filtered Extra Warnings: Note 1003 select '0' AS `a`,'0' AS `b`,'0' AS `c` from `test`.`t1` where 1 DROP TABLE t1; +# +# Bug#45266: Uninitialized variable lead to an empty result. +# +drop table if exists A,AA,B,BB; +CREATE TABLE `A` ( +`pk` int(11) NOT NULL AUTO_INCREMENT, +`date_key` date NOT NULL, +`date_nokey` date NOT NULL, +`datetime_key` datetime NOT NULL, +`int_nokey` int(11) NOT NULL, +`time_key` time NOT NULL, +`time_nokey` time NOT NULL, +PRIMARY KEY (`pk`), +KEY `date_key` (`date_key`), +KEY `time_key` (`time_key`), +KEY `datetime_key` (`datetime_key`) +); +CREATE TABLE `AA` ( +`pk` int(11) NOT NULL AUTO_INCREMENT, +`int_nokey` int(11) NOT NULL, +`time_key` time NOT NULL, +KEY `time_key` (`time_key`), +PRIMARY KEY (`pk`) +); +CREATE TABLE `B` ( +`date_nokey` date NOT NULL, +`date_key` date NOT NULL, +`time_key` time NOT NULL, +`datetime_nokey` datetime NOT NULL, +`varchar_key` varchar(1) NOT NULL, +KEY `date_key` (`date_key`), +KEY `time_key` (`time_key`), +KEY `varchar_key` (`varchar_key`) +); +INSERT INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x'); +CREATE TABLE `BB` ( +`pk` int(11) NOT NULL AUTO_INCREMENT, +`int_nokey` int(11) NOT NULL, +`date_key` date NOT NULL, +`varchar_nokey` varchar(1) NOT NULL, +`date_nokey` date NOT NULL, +PRIMARY KEY (`pk`), +KEY `date_key` (`date_key`) +); +INSERT INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18'); +SELECT table1 . `pk` AS field1 +FROM +(BB AS table1 INNER JOIN +(AA AS table2 STRAIGHT_JOIN A AS table3 +ON ( table3 . `date_key` = table2 . `pk` )) +ON ( table3 . `datetime_key` = table2 . `int_nokey` )) +WHERE ( table3 . `date_key` <= 4 AND table2 . `pk` = table1 . `varchar_nokey`) +GROUP BY field1 ; +field1 +SELECT table3 .`date_key` field1 +FROM +B table1 LEFT JOIN B table3 JOIN +(BB table6 JOIN A table7 ON table6 .`varchar_nokey`) +ON table6 .`int_nokey` ON table6 .`date_key` + WHERE NOT ( table1 .`varchar_key` AND table7 .`pk`) GROUP BY field1; +field1 +NULL +SELECT table4 . `time_nokey` AS field1 FROM +(AA AS table1 CROSS JOIN +(AA AS table2 STRAIGHT_JOIN +(B AS table3 STRAIGHT_JOIN A AS table4 +ON ( table4 . `date_key` = table3 . `time_key` )) +ON ( table4 . `pk` = table3 . `date_nokey` )) +ON ( table4 . `time_key` = table3 . `datetime_nokey` )) +WHERE ( table4 . `time_key` < table1 . `time_key` AND +table1 . `int_nokey` != 'f') +GROUP BY field1 ORDER BY field1 , field1; +field1 +SELECT table1 .`time_key` field2 FROM B table1 LEFT JOIN BB JOIN A table5 ON table5 .`date_nokey` ON table5 .`int_nokey` GROUP BY field2; +field2 +00:05:48 +15:13:38 +drop table A,AA,B,BB; +#end of test for bug#45266 End of 5.1 tests diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 35d61ce757d..17ab2b79043 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -1660,3 +1660,13 @@ declare continue handler for sqlstate '00000' set @x=0; end$$ ERROR 42000: Bad SQLSTATE: '00000' LOAD DATA INFILE '../../tmp/proc.txt' INTO TABLE mysql.proc; +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT MAX (a) FROM t1 WHERE b = 999999; +ERROR 42000: FUNCTION test.MAX does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual +SELECT AVG (a) FROM t1 WHERE b = 999999; +AVG (a) +NULL +SELECT non_existent (a) FROM t1 WHERE b = 999999; +ERROR 42000: FUNCTION test.non_existent does not exist +DROP TABLE t1; diff --git a/mysql-test/r/sp-fib.result b/mysql-test/r/sp-fib.result new file mode 100644 index 00000000000..a26e104c1e8 --- /dev/null +++ b/mysql-test/r/sp-fib.result @@ -0,0 +1,33 @@ +drop table if exists t3; +create table t3 ( f bigint unsigned not null ); +drop procedure if exists fib; +create procedure fib(n int unsigned) +begin +if n > 1 then +begin +declare x, y bigint unsigned; +declare c cursor for select f from t3 order by f desc limit 2; +open c; +fetch c into y; +fetch c into x; +insert into t3 values (x+y); +call fib(n-1); +## Close the cursor AFTER the recursion to ensure that the stack +## frame is somewhat intact. +close c; +end; +end if; +end| +set @@max_sp_recursion_depth= 20| +insert into t3 values (0), (1)| +call fib(4)| +select * from t3 order by f asc| +f +0 +1 +1 +2 +3 +drop table t3| +drop procedure fib| +set @@max_sp_recursion_depth= 0| diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 9574841bc35..3ad556b8c30 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -1337,52 +1337,6 @@ drop procedure opp| drop procedure ip| show procedure status where name like '%p%' and db='test'| Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation -drop table if exists t3| -create table t3 ( f bigint unsigned not null )| -drop procedure if exists fib| -create procedure fib(n int unsigned) -begin -if n > 1 then -begin -declare x, y bigint unsigned; -declare c cursor for select f from t3 order by f desc limit 2; -open c; -fetch c into y; -fetch c into x; -close c; -insert into t3 values (x+y); -call fib(n-1); -end; -end if; -end| -set @@max_sp_recursion_depth= 20| -insert into t3 values (0), (1)| -call fib(3)| -select * from t3 order by f asc| -f -0 -1 -1 -2 -truncate table t3| -insert into t3 values (0), (1)| -call fib(10)| -select * from t3 order by f asc| -f -0 -1 -1 -2 -3 -5 -8 -13 -21 -34 -55 -drop table t3| -drop procedure fib| -set @@max_sp_recursion_depth= 0| drop procedure if exists bar| create procedure bar(x char(16), y int) comment "111111111111" sql security invoker diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index d15efc6d7d7..c6641e673ee 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -233,4 +233,19 @@ rl_acquirer old drop procedure p1; drop table t1; set session low_priority_updates=default; +INSERT INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, +Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, +Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, +Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, +Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, +Create_user_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions, +max_updates, max_connections, max_user_connections) +VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', +'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '', +'', '', '', '0', '0', '0', '0'); +FLUSH PRIVILEGES; +CREATE PROCEDURE p1(i INT) BEGIN END; +DROP PROCEDURE p1; +DELETE FROM mysql.user WHERE User='mysqltest_1'; +FLUSH PRIVILEGES; set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 401340f204c..0b0d5a38d0b 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -506,3 +506,24 @@ mysqltest_32753@localhost set session sql_mode=@OLD_SQL_MODE; flush privileges; drop user mysqltest_32753@localhost; +DROP TABLE IF EXISTS t1,t2; +CREATE USER 'user_PCTFL'@'localhost' identified by 'PWD'; +CREATE USER 'user_no_PCTFL'@'localhost' identified by 'PWD'; +CREATE TABLE t1 (f1 BIGINT); +CREATE TABLE t2 (f1 CHAR(3) NOT NULL, f2 CHAR(20)); +GRANT ALL ON t1 TO 'user_PCTFL'@'localhost','user_no_PCTFL'@'localhost'; +GRANT SELECT(f1) ON t2 TO 'user_PCTFL'@'localhost','user_no_PCTFL'@'localhost'; +SET @OLD_SQL_MODE = @@SESSION.SQL_MODE; +SET SESSION SQL_MODE = 'PAD_CHAR_TO_FULL_LENGTH'; +DROP USER 'user_PCTFL'@'localhost'; +SET SESSION SQL_MODE = @OLD_SQL_MODE; +DROP USER 'user_no_PCTFL'@'localhost'; +FLUSH PRIVILEGES; +SELECT * FROM mysql.db WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; +Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv +SELECT * FROM mysql.tables_priv WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; +Host Db User Table_name Grantor Timestamp Table_priv Column_priv +SELECT * FROM mysql.columns_priv WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; +Host Db User Table_name Column_name Timestamp Column_priv +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index ca815540c29..ce3acba9b8a 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -1,13 +1,15 @@ set @old_concurrent_insert= @@global.concurrent_insert; set @@global.concurrent_insert= 0; +SET @old_log_output = @@global.log_output; +SET GLOBAL LOG_OUTPUT = 'FILE'; flush status; show status like 'Table_lock%'; Variable_name Value -Table_locks_immediate 1 +Table_locks_immediate 0 Table_locks_waited 0 select * from information_schema.session_status where variable_name like 'Table_lock%'; VARIABLE_NAME VARIABLE_VALUE -TABLE_LOCKS_IMMEDIATE 2 +TABLE_LOCKS_IMMEDIATE 0 TABLE_LOCKS_WAITED 0 # Switched to connection: con1 set sql_log_bin=0; @@ -154,7 +156,7 @@ Variable_name Value Com_show_status 3 show status like 'hand%write%'; Variable_name Value -Handler_write 5 +Handler_write 0 show status like '%tmp%'; Variable_name Value Created_tmp_disk_tables 0 @@ -162,7 +164,7 @@ Created_tmp_files 0 Created_tmp_tables 0 show status like 'hand%write%'; Variable_name Value -Handler_write 7 +Handler_write 0 show status like '%tmp%'; Variable_name Value Created_tmp_disk_tables 0 @@ -237,3 +239,4 @@ SELECT 9; DROP PROCEDURE p1; DROP FUNCTION f1; set @@global.concurrent_insert= @old_concurrent_insert; +SET GLOBAL log_output = @old_log_output; diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 23f15f618f2..4476735735c 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -2073,4 +2073,18 @@ select @a, @b; drop trigger trg1; drop trigger trg2; drop table t1, t2; +CREATE TABLE t1 ( a INT, b INT ); +CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY, b INT ); +INSERT INTO t1 (a) VALUES (1); +CREATE TRIGGER tr1 +BEFORE INSERT ON t2 +FOR EACH ROW +BEGIN +UPDATE a_nonextisting_table SET a = 1; +END// +CREATE TABLE IF NOT EXISTS t2 ( a INT, b INT ) SELECT a, b FROM t1; +ERROR 42S02: Table 'test.a_nonextisting_table' doesn't exist +SELECT * FROM t2; +a b +DROP TABLE t1, t2; End of 5.1 tests. diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result index 1e13bff03b1..335e6910a3a 100644 --- a/mysql-test/r/trigger_notembedded.result +++ b/mysql-test/r/trigger_notembedded.result @@ -462,4 +462,18 @@ unlock tables; select * from t1; i drop table t1; +CREATE DATABASE db1; +CREATE TABLE db1.t1 (a char(30)) ENGINE=MEMORY; +CREATE TRIGGER db1.trg AFTER INSERT ON db1.t1 FOR EACH ROW +INSERT INTO db1.t1 VALUES('Some very sensitive data goes here'); +CREATE USER 'no_rights'@'localhost'; +REVOKE ALL ON *.* FROM 'no_rights'@'localhost'; +FLUSH PRIVILEGES; +SELECT trigger_name FROM INFORMATION_SCHEMA.TRIGGERS +WHERE trigger_schema = 'db1'; +trigger_name +SHOW CREATE TRIGGER db1.trg; +ERROR 42000: Access denied; you need the TRIGGER privilege for this operation +DROP USER 'no_rights'@'localhost'; +DROP DATABASE db1; End of 5.1 tests. diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index f2b08d1c6b7..748aadee4fb 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1524,10 +1524,10 @@ Warnings: Warning 1264 Out of range value for column 'f1' at row 1 DESC t1; Field Type Null Key Default Extra -f1 decimal(59,30) NO 0.000000000000000000000000000000 +f1 decimal(65,30) NO 0.000000000000000000000000000000 SELECT f1 FROM t1; f1 -99999999999999999999999999999.999999999999999999999999999999 +99999999999999999999999999999999999.999999999999999999999999999999 DROP TABLE t1; select (1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 * 1.01500000 * 1.01500000 * 0.99500000); @@ -1577,3 +1577,56 @@ Error 1264 Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1 select cast(98.6 as decimal(2,0)); cast(98.6 as decimal(2,0)) 99 +# +# Bug #45262: Bad effects with CREATE TABLE and DECIMAL +# +CREATE TABLE t1 SELECT .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +Warnings: +Note 1265 Data truncated for column 'my_col' at row 1 +DESCRIBE t1; +Field Type Null Key Default Extra +my_col decimal(30,30) NO 0.000000000000000000000000000000 +SELECT my_col FROM t1; +my_col +0.123456789123456789123456789123 +DROP TABLE t1; +CREATE TABLE t1 SELECT 1 + .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +Warnings: +Note 1265 Data truncated for column 'my_col' at row 1 +DESCRIBE t1; +Field Type Null Key Default Extra +my_col decimal(65,30) NO 0.000000000000000000000000000000 +SELECT my_col FROM t1; +my_col +1.123456789123456789123456789123 +DROP TABLE t1; +CREATE TABLE t1 SELECT 1 * .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +Warnings: +Note 1265 Data truncated for column 'my_col' at row 1 +DESCRIBE t1; +Field Type Null Key Default Extra +my_col decimal(65,30) NO 0.000000000000000000000000000000 +SELECT my_col FROM t1; +my_col +0.123456789123456789123456789123 +DROP TABLE t1; +CREATE TABLE t1 SELECT 1 / .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +Warnings: +Note 1265 Data truncated for column 'my_col' at row 1 +DESCRIBE t1; +Field Type Null Key Default Extra +my_col decimal(65,4) YES NULL +SELECT my_col FROM t1; +my_col +8.1000 +DROP TABLE t1; +CREATE TABLE t1 SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +Warnings: +Note 1265 Data truncated for column 'my_col' at row 1 +DESCRIBE t1; +Field Type Null Key Default Extra +my_col decimal(65,30) YES NULL +SELECT my_col FROM t1; +my_col +0.012345687012345687012345687012 +DROP TABLE t1; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 3f79d81dd71..c1cd1840df8 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -1477,4 +1477,14 @@ SET @@sql_safe_updates= 0; DELETE FROM t1 ORDER BY (@@GLOBAL.INIT_FILE) ASC LIMIT 10; SET @@sql_safe_updates= @bug42778; DROP TABLE t1; +# +# BUG#10206 - InnoDB: Transaction requiring Max_BinLog_Cache_size > 4GB always rollsback +# +SET @old_max_binlog_cache_size = @@GLOBAL.max_binlog_cache_size; +# Set the max_binlog_cache_size to size more than 4GB. +SET GLOBAL max_binlog_cache_size = 5 * 1024 * 1024 * 1024; +SELECT @@GLOBAL.max_binlog_cache_size; +@@GLOBAL.max_binlog_cache_size +5368709120 +SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size; End of 5.1 tests diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 613939bfdf6..2dc448a29d8 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3718,6 +3718,117 @@ DROP TABLE t1; # -- End of test case for Bug#40825 +# +# Bug #45806 crash when replacing into a view with a join! +# +CREATE TABLE t1(a INT UNIQUE); +CREATE VIEW v1 AS SELECT t1.a FROM t1, t1 AS a; +INSERT INTO t1 VALUES (1), (2); +REPLACE INTO v1(a) SELECT 1 FROM t1,t1 AS c; +SELECT * FROM v1; +a +1 +2 +1 +2 +REPLACE INTO v1(a) SELECT 3 FROM t1,t1 AS c; +SELECT * FROM v1; +a +1 +2 +3 +1 +2 +3 +1 +2 +3 +DELETE FROM t1 WHERE a=3; +INSERT INTO v1(a) SELECT 1 FROM t1,t1 AS c +ON DUPLICATE KEY UPDATE `v1`.`a`= 1; +SELECT * FROM v1; +a +1 +2 +1 +2 +CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a; +REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c; +SELECT * FROM v2; +a +1 +2 +1 +2 +1 +2 +1 +2 +REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c; +SELECT * FROM v2; +a +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c +ON DUPLICATE KEY UPDATE `v2`.`a`= 1; +SELECT * FROM v2; +a +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +DROP VIEW v1; +DROP VIEW v2; +DROP TABLE t1; +# -- End of test case for Bug#45806 # ----------------------------------------------------------------- # -- End of 5.0 tests. # ----------------------------------------------------------------- diff --git a/mysql-test/r/xa.result b/mysql-test/r/xa.result index 592cf07522b..a597806d897 100644 --- a/mysql-test/r/xa.result +++ b/mysql-test/r/xa.result @@ -75,3 +75,17 @@ xa rollback 'a','c'; xa start 'a','c'; drop table t1; End of 5.0 tests +xa start 'a'; +xa end 'a'; +xa rollback 'a'; +xa start 'a'; +xa end 'a'; +xa rollback 'a'; +xa start 'a'; +xa end 'a'; +xa prepare 'a'; +xa commit 'a'; +xa start 'a'; +xa end 'a'; +xa prepare 'a'; +xa commit 'a'; diff --git a/mysql-test/suite/binlog/r/binlog_database.result b/mysql-test/suite/binlog/r/binlog_database.result index 8dbe0f21852..1cc9281f3fc 100644 --- a/mysql-test/suite/binlog/r/binlog_database.result +++ b/mysql-test/suite/binlog/r/binlog_database.result @@ -100,15 +100,15 @@ drop table tt1, t1; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # drop database if exists mysqltest1 -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ FLUSH STATUS; show databases; diff --git a/mysql-test/suite/binlog/r/binlog_innodb.result b/mysql-test/suite/binlog/r/binlog_innodb.result index 919ac33ef35..1922897f631 100644 --- a/mysql-test/suite/binlog/r/binlog_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_innodb.result @@ -66,49 +66,49 @@ COMMIT; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6) master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 2*a WHERE a > 1 master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3 master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3 master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog/r/binlog_innodb_row.result b/mysql-test/suite/binlog/r/binlog_innodb_row.result index fab79c4bc2f..f7415610dc5 100644 --- a/mysql-test/suite/binlog/r/binlog_innodb_row.result +++ b/mysql-test/suite/binlog/r/binlog_innodb_row.result @@ -9,7 +9,7 @@ commit; *** Results of the test: the binlog must have only Write_rows events not any Update_rows *** show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -24,7 +24,7 @@ commit; *** Results of the test: the binlog must have only one Write_rows event not two *** show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog/r/binlog_multi_engine.result b/mysql-test/suite/binlog/r/binlog_multi_engine.result index caae5f55d13..9252229903b 100644 --- a/mysql-test/suite/binlog/r/binlog_multi_engine.result +++ b/mysql-test/suite/binlog/r/binlog_multi_engine.result @@ -17,16 +17,16 @@ TRUNCATE t1b; TRUNCATE t1n; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query # # use `test`; BEGIN +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # use `test`; COMMIT +mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c -mysqld-bin.000001 # Query # # use `test`; BEGIN +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f mysqld-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c -mysqld-bin.000001 # Query # # use `test`; COMMIT +mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Table_map # # table_id: # (test.t1n) mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) @@ -48,9 +48,9 @@ TRUNCATE t1b; TRUNCATE t1n; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query # # use `test`; BEGIN +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # use `test`; COMMIT +mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Table_map # # table_id: # (test.t1n) @@ -73,14 +73,14 @@ UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query # # use `test`; BEGIN +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Table_map # # table_id: # (test.t1m) mysqld-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query # # use `test`; COMMIT -mysqld-bin.000001 # Query # # use `test`; BEGIN +mysqld-bin.000001 # Query # # COMMIT +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Table_map # # table_id: # (test.t1b) mysqld-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query # # use `test`; COMMIT +mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Table_map # # table_id: # (test.t1n) mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 25cb7a4726f..4baa47db129 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -12,11 +12,11 @@ show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -29,7 +29,7 @@ drop table t1; show binlog events in 'master-bin.000001' from 106; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Table_map 1 # table_id: # (test.t1) @@ -249,7 +249,7 @@ show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb -master-bin.000001 205 Query 1 273 use `test`; BEGIN +master-bin.000001 205 Query 1 273 BEGIN master-bin.000001 273 Table_map 1 314 table_id: # (test.t1) master-bin.000001 314 Write_rows 1 348 table_id: # flags: STMT_END_F master-bin.000001 348 Table_map 1 389 table_id: # (test.t1) @@ -266,7 +266,7 @@ show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb -master-bin.000001 206 Query 1 274 use `test`; BEGIN +master-bin.000001 206 Query 1 274 BEGIN master-bin.000001 274 Table_map 1 315 table_id: # (test.t1) master-bin.000001 315 Write_rows 1 349 table_id: # flags: STMT_END_F master-bin.000001 349 Table_map 1 390 table_id: # (test.t1) @@ -1085,10 +1085,10 @@ show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned) -master-bin.000001 227 Query 1 295 use `test`; BEGIN +master-bin.000001 227 Query 1 295 BEGIN master-bin.000001 295 Table_map 1 337 table_id: # (test.t1) master-bin.000001 337 Write_rows 1 383 table_id: # flags: STMT_END_F -master-bin.000001 383 Query 1 452 use `test`; COMMIT +master-bin.000001 383 Query 1 452 COMMIT master-bin.000001 452 Query 1 528 use `test`; drop table t1 reset master; CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -1192,32 +1192,32 @@ use test; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( `a` int(11) DEFAULT NULL ) -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) -master-bin.000001 # Query # # use `mysql`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysql`; COMMIT -master-bin.000001 # Query # # use `mysql`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysql`; COMMIT -master-bin.000001 # Query # # use `mysql`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysql`; COMMIT +master-bin.000001 # Query # # COMMIT drop table t1,t2,t3,tt1; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; insert delayed into t1 values (207); @@ -1227,46 +1227,46 @@ FLUSH TABLES; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( `a` int(11) DEFAULT NULL ) -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) -master-bin.000001 # Query # # use `mysql`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysql`; COMMIT -master-bin.000001 # Query # # use `mysql`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysql`; COMMIT -master-bin.000001 # Query # # use `mysql`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysql`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */ master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES insert delayed into t1 values (null),(null),(null),(null); insert delayed into t1 values (null),(null),(400),(null); diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result index 49aa64adfb5..8daed8d5c25 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -5,16 +5,15 @@ reset master; insert into t2 values (@v); show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT flush logs; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_insert_select.result b/mysql-test/suite/binlog/r/binlog_row_insert_select.result index d4370c4de12..c7386b092e4 100644 --- a/mysql-test/suite/binlog/r/binlog_row_insert_select.result +++ b/mysql-test/suite/binlog/r/binlog_row_insert_select.result @@ -8,10 +8,10 @@ insert into t1 select * from t2; ERROR 23000: Duplicate entry '2' for key 'a' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select * from t1; a 1 diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index 4f3bc57e576..4d639c3da68 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -8,7 +8,7 @@ insert into t2 select * from t1; commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t2) @@ -25,12 +25,12 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK delete from t1; delete from t2; reset master; @@ -45,7 +45,7 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; savepoint my_savepoint @@ -74,7 +74,7 @@ a 7 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; savepoint my_savepoint @@ -100,12 +100,12 @@ get_lock("a",10) 1 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK delete from t1; delete from t2; reset master; @@ -113,14 +113,14 @@ insert into t1 values(9); insert into t2 select * from t1; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT delete from t1; delete from t2; reset master; @@ -129,7 +129,7 @@ begin; insert into t2 select * from t1; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -137,11 +137,11 @@ insert into t1 values(11); commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t1) @@ -157,7 +157,7 @@ insert into t2 select * from t1; commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t2) @@ -184,7 +184,7 @@ rollback to savepoint my_savepoint; commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -205,7 +205,7 @@ a 18 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t1) @@ -257,31 +257,31 @@ get_lock("lock1",60) 1 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; alter table t2 engine=MyISAM -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; drop table t1,t2 master-bin.000001 # Query # # use `test`; create table t0 (n int) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t0) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t0) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb do release_lock("lock1"); drop table t0,t2; @@ -364,46 +364,46 @@ a b DROP TABLE t1,t2; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE if exists t2 -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2 master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; TRUNCATE table t2 -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t2 -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK master-bin.000001 # Query # # use `test`; TRUNCATE table t2 -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ reset master; create table t1 (a int) engine=innodb; @@ -447,12 +447,12 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.ti) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.ti) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 @@ -499,11 +499,11 @@ insert into t2 values (bug27417(2)); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* only (!) with fixes for #23333 will show there is the query */; select count(*) from t1 /* must be 3 */; count(*) @@ -518,11 +518,11 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT /* the query must be in regardless of #23333 */; select count(*) from t1 /* must be 5 */; count(*) @@ -544,11 +544,11 @@ insert into t2 values (bug27417(1)); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) @@ -561,12 +561,12 @@ insert into t2 select bug27417(1) union select bug27417(2); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 2 */; count(*) @@ -578,13 +578,13 @@ update t3 set b=b+bug27417(1); ERROR 23000: Duplicate entry '4' for key 'b' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Update_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 2 */; count(*) @@ -598,11 +598,11 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 4 */; count(*) @@ -631,12 +631,12 @@ delete from t2; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) @@ -654,13 +654,13 @@ delete t2.* from t2,t5 where t2.a=t5.a + 1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Delete_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) @@ -679,13 +679,13 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; @@ -706,12 +706,12 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.ti) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.ti) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 @@ -795,10 +795,10 @@ insert into t2 values (bug27417(1)); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=1 master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1)) -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 @@ -810,10 +810,10 @@ insert into t2 select bug27417(1) union select bug27417(2); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=2 master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2) -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 2 */; count(*) 2 @@ -867,10 +867,10 @@ delete from t2; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=9 master-bin.000001 # Query # # use `test`; delete from t2 -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 @@ -887,9 +887,9 @@ delete t2.* from t2,t5 where t2.a=t5.a + 1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1 -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 @@ -907,14 +907,14 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Execute_load_query # # use `test`; load data infile '../../std_data/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2) ;file_id=# -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; drop function bug27417; diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_db_filter.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_db_filter.result new file mode 100644 index 00000000000..354fd832fb3 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_db_filter.result @@ -0,0 +1,43 @@ +RESET MASTER; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int); +CREATE TABLE t3 (txt TEXT); +CREATE TABLE t4 (a int) ENGINE= InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t2 VALUES (1); +INSERT INTO t2 VALUES (2); +INSERT INTO t1 VALUES (3); +LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/words.dat' INTO TABLE t3; +INSERT INTO t1 VALUES (4); +CREATE DATABASE b42941; +use b42941; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int); +CREATE TABLE t3 (txt TEXT); +CREATE TABLE t4 (a int) ENGINE= InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t2 VALUES (1); +INSERT INTO t2 VALUES (2); +INSERT INTO t1 VALUES (3); +LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/words.dat' INTO TABLE t3; +INSERT INTO t1 VALUES (4); +INSERT INTO test.t1 VALUES (5); +FLUSH LOGS; +UPDATE test.t1 t11, b42941.t1 t12 SET t11.id=10, t12.id=100; +BEGIN; +INSERT INTO test.t4 VALUES (1); +INSERT INTO b42941.t4 VALUES (1); +UPDATE test.t4 tn4, b42941.t4 tt4 SET tn4.a= 10, tt4.a= 100; +COMMIT; +FLUSH LOGS; +SET @b42941_output.1= LOAD_FILE('MYSQLTEST_VARDIR/tmp/b42941-mysqlbinlog.1'); +SET @b42941_output.2= LOAD_FILE('MYSQLTEST_VARDIR/tmp/b42941-mysqlbinlog.2'); +SET @b42941_output.1= LOAD_FILE('MYSQLTEST_VARDIR/tmp/b42941-mysqlbinlog.1'); +SET @b42941_output.2= LOAD_FILE('MYSQLTEST_VARDIR/tmp/b42941-mysqlbinlog.2'); +SET @b42941_output.1= LOAD_FILE('MYSQLTEST_VARDIR/tmp/b42941-mysqlbinlog.1'); +SET @b42941_output.2= LOAD_FILE('MYSQLTEST_VARDIR/tmp/b42941-mysqlbinlog.2'); +DROP DATABASE b42941; +use test; +DROP TABLE t1, t2, t3, t4; diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index efdeb30a2af..d151e31269f 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -6,7 +6,7 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: # master-bin.000001 106 Query 1 213 use `test`; create table t1 (a int, b int) engine=innodb -master-bin.000001 213 Query 1 281 use `test`; BEGIN +master-bin.000001 213 Query 1 281 BEGIN master-bin.000001 281 Query 1 371 use `test`; insert into t1 values (1,2) master-bin.000001 371 Xid 1 398 COMMIT /* XID */ drop table t1; @@ -24,10 +24,10 @@ show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert t1 values (5) master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert t2 values (5) master-bin.000001 # Xid # # COMMIT /* XID */ drop table t1,t2; @@ -39,7 +39,7 @@ drop table t1; show binlog events in 'master-bin.000001' from 106; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test`; insert into t1 values(100 + 4) master-bin.000001 # Query 1 # use `test`; insert into t1 values(99 + 4) master-bin.000001 # Query 1 # use `test`; insert into t1 values(98 + 4) @@ -159,7 +159,7 @@ show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb -master-bin.000001 205 Query 1 273 use `test`; BEGIN +master-bin.000001 205 Query 1 273 BEGIN master-bin.000001 273 Query 1 361 use `test`; insert into t1 values (1) master-bin.000001 361 Query 1 449 use `test`; insert into t1 values (2) master-bin.000001 449 Query 1 537 use `test`; insert into t1 values (3) @@ -173,7 +173,7 @@ show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb -master-bin.000001 206 Query 1 274 use `test`; BEGIN +master-bin.000001 206 Query 1 274 BEGIN master-bin.000001 274 Query 1 365 use `test`; insert into t1 values( 400 ) master-bin.000001 365 Query 1 456 use `test`; insert into t1 values( 399 ) master-bin.000001 456 Query 1 547 use `test`; insert into t1 values( 398 ) @@ -730,18 +730,18 @@ master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('An master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' master-bin.000001 # Query # # use `test`; drop table t1,t2,t3,tt1 master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES insert delayed into t1 values (null),(null),(null),(null); insert delayed into t1 values (null),(null),(400),(null); diff --git a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result index 1cd77cfbed4..f3a01f66fc2 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result +++ b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result @@ -109,35 +109,35 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query # # use `test`; drop table t1,t2 master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete from t1 where a=10 -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; update t1 set a=11 where a=15 -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(1) -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert ignore into t1 values(1) -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; replace into t1 values(100) -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581 master-bin.000001 # Execute_load_query # # use `test`; load data infile '../../std_data/words.dat' into table t2 ;file_id=# -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; alter table t1 add b int master-bin.000001 # Query # # use `test`; alter table t1 drop b master-bin.000001 # Query # # use `test`; create table t3 like t1 -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 select * from t3 -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; replace into t1 select * from t3 -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT drop table t1,t2,t3; CREATE TABLE t1(a INT) ENGINE=BLACKHOLE; INSERT DELAYED INTO t1 VALUES(1); @@ -167,9 +167,9 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(1) -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT drop table if exists t1; reset master; create table t1 (a int auto_increment, primary key (a)) engine=blackhole; @@ -181,16 +181,16 @@ insert into t1 values (55), (NULL); show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # Query 1 # use `test`; insert into t1 values (11), (NULL), (NULL), (NULL) -master-bin.000001 # Query 1 # use `test`; COMMIT -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Intvar 1 # INSERT_ID=3 master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL), (33), (NULL) -master-bin.000001 # Query 1 # use `test`; COMMIT -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Intvar 1 # INSERT_ID=5 master-bin.000001 # Query 1 # use `test`; insert into t1 values (55), (NULL) -master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Query 1 # COMMIT drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index 38488c9331d..95773a247b9 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -8,7 +8,7 @@ insert into t2 select * from t1; commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(1) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Xid # # COMMIT /* XID */ @@ -23,10 +23,10 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(2) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK delete from t1; delete from t2; reset master; @@ -41,7 +41,7 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(3) master-bin.000001 # Query # # use `test`; savepoint my_savepoint master-bin.000001 # Query # # use `test`; insert into t1 values(4) @@ -67,7 +67,7 @@ a 7 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(5) master-bin.000001 # Query # # use `test`; savepoint my_savepoint master-bin.000001 # Query # # use `test`; insert into t1 values(6) @@ -89,10 +89,10 @@ get_lock("a",10) 1 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(8) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK delete from t1; delete from t2; reset master; @@ -100,7 +100,7 @@ insert into t1 values(9); insert into t2 select * from t1; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(9) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 @@ -112,7 +112,7 @@ begin; insert into t2 select * from t1; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(10) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 @@ -120,11 +120,11 @@ insert into t1 values(11); commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(10) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(11) master-bin.000001 # Xid # # COMMIT /* XID */ alter table t2 engine=INNODB; @@ -137,7 +137,7 @@ insert into t2 select * from t1; commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(12) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Xid # # COMMIT /* XID */ @@ -162,7 +162,7 @@ rollback to savepoint my_savepoint; commit; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(14) master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; @@ -182,7 +182,7 @@ a 18 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(16) master-bin.000001 # Query # # use `test`; insert into t1 values(18) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -232,26 +232,26 @@ get_lock("lock1",60) 1 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(16) master-bin.000001 # Query # # use `test`; insert into t1 values(18) master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete from t1 master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete from t2 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; alter table t2 engine=MyISAM -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values (1) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; insert into t2 values (20) master-bin.000001 # Query # # use `test`; drop table t1,t2 master-bin.000001 # Query # # use `test`; create temporary table ti (a int) engine=innodb -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values(1) -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create temporary table t1 (a int) engine=myisam master-bin.000001 # Query # # use `test`; insert t1 values (1) master-bin.000001 # Query # # use `test`; create table t0 (n int) @@ -356,9 +356,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (8,8) master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (9,9) master-bin.000001 # Query # # use `test`; TRUNCATE table t2 master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100) -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t1,t2 reset master; create table t1 (a int) engine=innodb; @@ -402,11 +402,11 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values (1) master-bin.000001 # Query # # use `test`; insert into ti values (2) master-bin.000001 # Query # # use `test`; insert into tt select * from ti -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 @@ -428,11 +428,11 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values (1) master-bin.000001 # Query # # use `test`; insert into ti values (2) /* to make the dup error in the following */ master-bin.000001 # Query # # use `test`; insert into tt select * from ti /* one affected and error */ -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 @@ -499,10 +499,10 @@ insert into t2 values (bug27417(1)); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=1 master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1)) -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) @@ -515,10 +515,10 @@ insert into t2 select bug27417(1) union select bug27417(2); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=2 master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2) -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 2 */; count(*) @@ -575,10 +575,10 @@ delete from t2; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=9 master-bin.000001 # Query # # use `test`; delete from t2 -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) @@ -596,9 +596,9 @@ delete t2.* from t2,t5 where t2.a=t5.a + 1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1 -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) @@ -617,12 +617,12 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # Execute_load_query # # use `test`; load data infile '../../std_data/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2) ;file_id=# -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; @@ -644,11 +644,11 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values (1) master-bin.000001 # Query # # use `test`; insert into ti values (2) master-bin.000001 # Query # # use `test`; insert into tt select * from ti -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 @@ -670,11 +670,11 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values (1) master-bin.000001 # Query # # use `test`; insert into ti values (2) /* to make the dup error in the following */ master-bin.000001 # Query # # use `test`; insert into tt select * from ti /* one affected and error */ -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 @@ -739,10 +739,10 @@ insert into t2 values (bug27417(1)); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=1 master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1)) -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 @@ -754,10 +754,10 @@ insert into t2 select bug27417(1) union select bug27417(2); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=2 master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2) -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 2 */; count(*) 2 @@ -811,10 +811,10 @@ delete from t2; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=9 master-bin.000001 # Query # # use `test`; delete from t2 -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 @@ -831,9 +831,9 @@ delete t2.* from t2,t5 where t2.a=t5.a + 1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1 -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 @@ -851,14 +851,14 @@ count(*) 2 show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Execute_load_query # # use `test`; load data infile '../../std_data/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2) ;file_id=# -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Query # # ROLLBACK drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; drop function bug27417; diff --git a/mysql-test/suite/binlog/r/binlog_stm_row.result b/mysql-test/suite/binlog/r/binlog_stm_row.result index d1cc55f03b3..f96073a2b92 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_row.result +++ b/mysql-test/suite/binlog/r/binlog_stm_row.result @@ -65,10 +65,10 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES(2) master-bin.000001 # Query # # use `test`; INSERT INTO t1 SELECT * FROM t2 WHERE GET_LOCK('Bug#34306', 120) master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (3) master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (4) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT DROP TABLE t1; DROP TABLE t2; SET GLOBAL BINLOG_FORMAT = @saved_global_binlog_format; diff --git a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result new file mode 100644 index 00000000000..439bff0cfe1 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result @@ -0,0 +1,30 @@ +### NOT filtered database => assertion: warnings ARE shown +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a int, b int, primary key (a)); +INSERT INTO t1 VALUES (1,2), (2,3); +UPDATE t1 SET b='4' WHERE a=1 LIMIT 1; +Warnings: +Note 1592 Statement may not be safe to log in statement format. +UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1; +Warnings: +Note 1592 Statement may not be safe to log in statement format. +DROP TABLE t1; +### NOT filtered database => assertion: binlog disabled and warnings ARE NOT shown +SET SQL_LOG_BIN= 0; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a int, b int, primary key (a)); +INSERT INTO t1 VALUES (1,2), (2,3); +UPDATE t1 SET b='4' WHERE a=1 LIMIT 1; +UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1; +DROP TABLE t1; +SET SQL_LOG_BIN= 1; +### FILTERED database => assertion: warnings ARE NOT shown +CREATE DATABASE b42851; +USE b42851; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a int, b int, primary key (a)); +INSERT INTO t1 VALUES (1,2), (2,3); +UPDATE t1 SET b='4' WHERE a=1 LIMIT 1; +UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1; +DROP TABLE t1; +DROP DATABASE b42851; diff --git a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test new file mode 100644 index 00000000000..0422c204270 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test @@ -0,0 +1,143 @@ +# BUG#42941: --database parameter to mysqlbinlog fails with RBR +# +# WHAT +# ==== +# +# This test aims at checking whether a rows log event is printed or +# not when --database parameter is used to filter events from one +# given database. +# +# HOW +# === +# +# The test is implemented as follows: +# +# i) Some operations are done in two different databases: +# 'test' and 'b42941'; +# ii) mysqlbinlog is used to dump the contents of the binlog file +# filtering only events from 'b42941'. The result of the dump is +# stored in a temporary file. (This is done with and without +# --verbose/hexdump flag); +# iii) The contents of the dump are loaded into a session variable; +# iv) The variable contents are searched for 'test' and 'b42941'; +# v) Should 'test' be found, an ERROR is reported. Should 'b42941' be +# absent, an ERROR is reported. + +-- source include/have_log_bin.inc +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc + +RESET MASTER; +-- let $MYSQLD_DATADIR= `select @@datadir` + +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int); +CREATE TABLE t3 (txt TEXT); +CREATE TABLE t4 (a int) ENGINE= InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t2 VALUES (1); +INSERT INTO t2 VALUES (2); +INSERT INTO t1 VALUES (3); +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/words.dat' INTO TABLE t3 +INSERT INTO t1 VALUES (4); + +CREATE DATABASE b42941; +use b42941; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int); +CREATE TABLE t3 (txt TEXT); +CREATE TABLE t4 (a int) ENGINE= InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t2 VALUES (1); +INSERT INTO t2 VALUES (2); +INSERT INTO t1 VALUES (3); +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/words.dat' INTO TABLE t3 +INSERT INTO t1 VALUES (4); + +INSERT INTO test.t1 VALUES (5); + +FLUSH LOGS; + +UPDATE test.t1 t11, b42941.t1 t12 SET t11.id=10, t12.id=100; + +BEGIN; +INSERT INTO test.t4 VALUES (1); +INSERT INTO b42941.t4 VALUES (1); +UPDATE test.t4 tn4, b42941.t4 tt4 SET tn4.a= 10, tt4.a= 100; +COMMIT; + +FLUSH LOGS; + +-- let $log_file1= $MYSQLD_DATADIR/master-bin.000001 +-- let $log_file2= $MYSQLD_DATADIR/master-bin.000002 +-- let $outfile= $MYSQLTEST_VARDIR/tmp/b42941-mysqlbinlog +-- let $cmd= $MYSQL_BINLOG + +let $i= 3; +while($i) +{ + -- let $flags=--database=b42941 + + # construct CLI for mysqlbinlog + if(`SELECT $i=3`) + { + -- let $flags= $flags --verbose --hexdump + } + + if(`SELECT $i=2`) + { + -- let $flags= $flags --verbose + } + +# if(`SELECT $i=1`) +# { + # do nothing $flags is already set as it should be +# } + + # execute mysqlbinlog on the two available master binlog files + -- exec $cmd $flags $log_file1 > $outfile.1 + -- exec $cmd $flags $log_file2 > $outfile.2 + + # load outputs into a variable + -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR + -- eval SET @b42941_output.1= LOAD_FILE('$outfile.1') + + -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR + -- eval SET @b42941_output.2= LOAD_FILE('$outfile.2') + + # remove unecessary files + -- remove_file $outfile.1 + -- remove_file $outfile.2 + + # assertion: events for database test are filtered + if (`SELECT INSTR(@b42941_output.1, 'test')`) + { + -- echo **** ERROR **** Database name 'test' FOUND in mysqlbinlog output ($flags $outfile.1). + } + + if (`SELECT INSTR(@b42941_output.2, 'test')`) + { + -- echo **** ERROR **** Database name 'test' FOUND in mysqlbinlog output ($flags $outfile.2). + } + + # assertion: events for database b42941 are not filtered + if (!`SELECT INSTR(@b42941_output.1, 'b42941')`) + { + -- echo **** ERROR **** Database name 'b42941' NOT FOUND in mysqlbinlog output ($flags $outfile.1). + } + + if (!`SELECT INSTR(@b42941_output.2, 'b42941')`) + { + -- echo **** ERROR **** Database name 'b42941' NOT FOUND in mysqlbinlog output ($flags $outfile.2). + } + + dec $i; +} + +DROP DATABASE b42941; +use test; +DROP TABLE t1, t2, t3, t4; diff --git a/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning-master.opt b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning-master.opt new file mode 100644 index 00000000000..24c2027e399 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning-master.opt @@ -0,0 +1 @@ +--binlog-ignore-db=b42851 diff --git a/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test new file mode 100644 index 00000000000..0bf685ea921 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test @@ -0,0 +1,73 @@ +# BUG#42851: Spurious "Statement is not safe to log in statement +# format." warnings +# +# WHY +# === +# +# This test aims at checking that the fix that removes spurious +# entries in the error log when the statement is filtered out from +# binlog, is working. +# +# HOW +# === +# +# The test case is split into three assertions when issuing statements +# containing LIMIT and ORDER BY: +# +# i) issue statements in database that is not filtered => check +# that warnings ARE shown; +# +# ii) issue statements in database that is not filtered, but with +# binlog disabled => check that warnings ARE NOT shown; +# +# iii) issue statements in database that is filtered => check that +# warnings ARE NOT shown. + +-- source include/have_log_bin.inc +-- source include/have_binlog_format_statement.inc + +-- echo ### NOT filtered database => assertion: warnings ARE shown + +-- disable_warnings +DROP TABLE IF EXISTS t1; +-- enable_warnings + +CREATE TABLE t1 (a int, b int, primary key (a)); +INSERT INTO t1 VALUES (1,2), (2,3); +UPDATE t1 SET b='4' WHERE a=1 LIMIT 1; +UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1; +DROP TABLE t1; + +-- echo ### NOT filtered database => assertion: binlog disabled and warnings ARE NOT shown + +SET SQL_LOG_BIN= 0; + +-- disable_warnings +DROP TABLE IF EXISTS t1; +-- enable_warnings + +CREATE TABLE t1 (a int, b int, primary key (a)); +INSERT INTO t1 VALUES (1,2), (2,3); +UPDATE t1 SET b='4' WHERE a=1 LIMIT 1; +UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1; +DROP TABLE t1; + +SET SQL_LOG_BIN= 1; + +-- echo ### FILTERED database => assertion: warnings ARE NOT shown + +CREATE DATABASE b42851; +USE b42851; + +-- disable_warnings +DROP TABLE IF EXISTS t1; +-- enable_warnings + +CREATE TABLE t1 (a int, b int, primary key (a)); +INSERT INTO t1 VALUES (1,2), (2,3); +UPDATE t1 SET b='4' WHERE a=1 LIMIT 1; +UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1; +DROP TABLE t1; + +# clean up +DROP DATABASE b42851; diff --git a/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc b/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc index c8e8a186673..098b8c6eca2 100644 --- a/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc +++ b/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc @@ -126,7 +126,6 @@ ORDER BY constraint_catalog, constraint_schema, constraint_name, eval $select; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); eval $select; diff --git a/mysql-test/suite/funcs_1/datadict/is_routines.inc b/mysql-test/suite/funcs_1/datadict/is_routines.inc index 19f7ed5d230..c2b547e600f 100644 --- a/mysql-test/suite/funcs_1/datadict/is_routines.inc +++ b/mysql-test/suite/funcs_1/datadict/is_routines.inc @@ -179,7 +179,6 @@ GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost'; FLUSH PRIVILEGES; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); --replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" diff --git a/mysql-test/suite/funcs_1/datadict/is_schemata.inc b/mysql-test/suite/funcs_1/datadict/is_schemata.inc index 96061d541b7..29e1f6af4ef 100644 --- a/mysql-test/suite/funcs_1/datadict/is_schemata.inc +++ b/mysql-test/suite/funcs_1/datadict/is_schemata.inc @@ -104,7 +104,6 @@ eval $my_select; eval $my_show; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict_1); # Shows db_datadict_1 diff --git a/mysql-test/suite/funcs_1/datadict/is_tables.inc b/mysql-test/suite/funcs_1/datadict/is_tables.inc index 4f608eb02ea..d1e4608a572 100644 --- a/mysql-test/suite/funcs_1/datadict/is_tables.inc +++ b/mysql-test/suite/funcs_1/datadict/is_tables.inc @@ -130,7 +130,6 @@ WHERE table_schema = 'db_datadict' ORDER BY table_name; let $my_show = SHOW TABLES FROM db_datadict; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); # tb2 is not granted to anyone diff --git a/mysql-test/suite/funcs_1/datadict/is_triggers.inc b/mysql-test/suite/funcs_1/datadict/is_triggers.inc index 70d5540e163..3b83a75295b 100644 --- a/mysql-test/suite/funcs_1/datadict/is_triggers.inc +++ b/mysql-test/suite/funcs_1/datadict/is_triggers.inc @@ -122,7 +122,6 @@ let $my_select = SELECT * FROM information_schema.triggers WHERE trigger_name = 'trg1'; let $my_show = SHOW TRIGGERS FROM db_datadict; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); --replace_result $engine_type <engine_type> diff --git a/mysql-test/suite/funcs_1/datadict/is_views.inc b/mysql-test/suite/funcs_1/datadict/is_views.inc index 542dab05a8e..32e66e4f684 100644 --- a/mysql-test/suite/funcs_1/datadict/is_views.inc +++ b/mysql-test/suite/funcs_1/datadict/is_views.inc @@ -108,7 +108,6 @@ WHERE table_schema = 'db_datadict' ORDER BY table_name; eval $select; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , test); eval $select; diff --git a/mysql-test/suite/funcs_1/datadict/statistics.inc b/mysql-test/suite/funcs_1/datadict/statistics.inc index 6f24f422b5e..00fd7a1b06b 100644 --- a/mysql-test/suite/funcs_1/datadict/statistics.inc +++ b/mysql-test/suite/funcs_1/datadict/statistics.inc @@ -42,7 +42,6 @@ ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; eval $my_select; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1,localhost,testuser1,,db_datadict); --replace_column 10 #CARD# diff --git a/mysql-test/suite/funcs_1/datadict/table_constraints.inc b/mysql-test/suite/funcs_1/datadict/table_constraints.inc index 513057c84a0..9e57976862b 100644 --- a/mysql-test/suite/funcs_1/datadict/table_constraints.inc +++ b/mysql-test/suite/funcs_1/datadict/table_constraints.inc @@ -33,7 +33,6 @@ ORDER BY table_schema,table_name,constraint_name; eval $my_select; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1,localhost,testuser1,,db_datadict); eval $my_select; diff --git a/mysql-test/suite/funcs_1/datadict/tables.inc b/mysql-test/suite/funcs_1/datadict/tables.inc index 8dae7ba0ebc..5aa072d184c 100644 --- a/mysql-test/suite/funcs_1/datadict/tables.inc +++ b/mysql-test/suite/funcs_1/datadict/tables.inc @@ -37,7 +37,6 @@ CREATE USER testuser1@localhost; GRANT SELECT ON test1.* TO testuser1@localhost; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1,localhost,testuser1,,test1); --source suite/funcs_1/datadict/tables2.inc diff --git a/mysql-test/suite/funcs_1/datadict/tables1.inc b/mysql-test/suite/funcs_1/datadict/tables1.inc index 2dff32d81a9..2e054a9dcfb 100644 --- a/mysql-test/suite/funcs_1/datadict/tables1.inc +++ b/mysql-test/suite/funcs_1/datadict/tables1.inc @@ -27,7 +27,6 @@ CREATE USER testuser1@localhost; GRANT SELECT ON test1.* TO testuser1@localhost; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1,localhost,testuser1,,test1); --source suite/funcs_1/datadict/tables2.inc diff --git a/mysql-test/suite/funcs_1/r/charset_collation.result b/mysql-test/suite/funcs_1/r/charset_collation.result new file mode 100644 index 00000000000..b3183ba48e1 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/charset_collation.result @@ -0,0 +1,40 @@ +DROP USER dbdict_test@localhost; +CREATE USER dbdict_test@localhost; +# Establish connection con (user=dbdict_test) + +SELECT * +FROM information_schema.character_sets +WHERE character_set_name IN ('utf8','latin1','binary') +ORDER BY character_set_name; +CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN +binary binary Binary pseudo charset 1 +latin1 latin1_swedish_ci cp1252 West European 1 +utf8 utf8_general_ci UTF-8 Unicode 3 + +SELECT * +FROM information_schema.collations +WHERE character_set_name IN ('utf8','latin1','binary') +AND (collation_name LIKE CONCAT(character_set_name,'_general_ci') +OR +collation_name LIKE CONCAT(character_set_name,'_bin')) +ORDER BY collation_name; +COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN +latin1_bin latin1 47 Yes 1 +latin1_general_ci latin1 48 Yes 1 +utf8_bin utf8 83 Yes 1 +utf8_general_ci utf8 33 Yes Yes 1 + +SELECT * +FROM information_schema.collation_character_set_applicability +WHERE character_set_name IN ('utf8','latin1','binary') +AND (collation_name LIKE CONCAT(character_set_name,'_general_ci') +OR +collation_name LIKE CONCAT(character_set_name,'_bin')) +ORDER BY collation_name, character_set_name; +COLLATION_NAME CHARACTER_SET_NAME +latin1_bin latin1 +latin1_general_ci latin1 +utf8_bin utf8 +utf8_general_ci utf8 +# Switch to connection default + disconnect con +DROP USER dbdict_test@localhost; diff --git a/mysql-test/suite/funcs_1/r/charset_collation_1.result b/mysql-test/suite/funcs_1/r/charset_collation_1.result deleted file mode 100644 index 55ed4b4704c..00000000000 --- a/mysql-test/suite/funcs_1/r/charset_collation_1.result +++ /dev/null @@ -1,312 +0,0 @@ -DROP USER dbdict_test@localhost; -CREATE USER dbdict_test@localhost; -# Establish connection con (user=dbdict_test) - -SELECT * -FROM information_schema.character_sets -ORDER BY character_set_name; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -ascii ascii_general_ci US ASCII 1 -big5 big5_chinese_ci Big5 Traditional Chinese 2 -binary binary Binary pseudo charset 1 -cp1250 cp1250_general_ci Windows Central European 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -cp850 cp850_general_ci DOS West European 1 -cp852 cp852_general_ci DOS Central European 1 -cp866 cp866_general_ci DOS Russian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -dec8 dec8_swedish_ci DEC West European 1 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 -euckr euckr_korean_ci EUC-KR Korean 2 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -greek greek_general_ci ISO 8859-7 Greek 1 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -hp8 hp8_english_ci HP West European 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -swe7 swe7_swedish_ci 7bit Swedish 1 -tis620 tis620_thai_ci TIS620 Thai 1 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -ujis ujis_japanese_ci EUC-JP Japanese 3 -utf8 utf8_general_ci UTF-8 Unicode 3 - -SELECT * -FROM information_schema.collations -ORDER BY collation_name; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -armscii8_bin armscii8 64 0 -armscii8_general_ci armscii8 32 Yes 0 -ascii_bin ascii 65 0 -ascii_general_ci ascii 11 Yes 0 -big5_bin big5 84 Yes 1 -big5_chinese_ci big5 1 Yes Yes 1 -binary binary 63 Yes Yes 1 -cp1250_bin cp1250 66 Yes 1 -cp1250_croatian_ci cp1250 44 Yes 1 -cp1250_czech_cs cp1250 34 Yes 2 -cp1250_general_ci cp1250 26 Yes Yes 1 -cp1250_polish_ci cp1250 99 Yes 1 -cp1251_bin cp1251 50 0 -cp1251_bulgarian_ci cp1251 14 0 -cp1251_general_ci cp1251 51 Yes 0 -cp1251_general_cs cp1251 52 0 -cp1251_ukrainian_ci cp1251 23 0 -cp1256_bin cp1256 67 0 -cp1256_general_ci cp1256 57 Yes 0 -cp1257_bin cp1257 58 0 -cp1257_general_ci cp1257 59 Yes 0 -cp1257_lithuanian_ci cp1257 29 0 -cp850_bin cp850 80 0 -cp850_general_ci cp850 4 Yes 0 -cp852_bin cp852 81 0 -cp852_general_ci cp852 40 Yes 0 -cp866_bin cp866 68 0 -cp866_general_ci cp866 36 Yes 0 -cp932_bin cp932 96 Yes 1 -cp932_japanese_ci cp932 95 Yes Yes 1 -dec8_bin dec8 69 0 -dec8_swedish_ci dec8 3 Yes 0 -eucjpms_bin eucjpms 98 Yes 1 -eucjpms_japanese_ci eucjpms 97 Yes Yes 1 -euckr_bin euckr 85 Yes 1 -euckr_korean_ci euckr 19 Yes Yes 1 -gb2312_bin gb2312 86 Yes 1 -gb2312_chinese_ci gb2312 24 Yes Yes 1 -gbk_bin gbk 87 Yes 1 -gbk_chinese_ci gbk 28 Yes Yes 1 -geostd8_bin geostd8 93 0 -geostd8_general_ci geostd8 92 Yes 0 -greek_bin greek 70 0 -greek_general_ci greek 25 Yes 0 -hebrew_bin hebrew 71 0 -hebrew_general_ci hebrew 16 Yes 0 -hp8_bin hp8 72 0 -hp8_english_ci hp8 6 Yes 0 -keybcs2_bin keybcs2 73 0 -keybcs2_general_ci keybcs2 37 Yes 0 -koi8r_bin koi8r 74 0 -koi8r_general_ci koi8r 7 Yes 0 -koi8u_bin koi8u 75 0 -koi8u_general_ci koi8u 22 Yes 0 -latin1_bin latin1 47 Yes 1 -latin1_danish_ci latin1 15 Yes 1 -latin1_general_ci latin1 48 Yes 1 -latin1_general_cs latin1 49 Yes 1 -latin1_german1_ci latin1 5 Yes 1 -latin1_german2_ci latin1 31 Yes 2 -latin1_spanish_ci latin1 94 Yes 1 -latin1_swedish_ci latin1 8 Yes Yes 1 -latin2_bin latin2 77 Yes 1 -latin2_croatian_ci latin2 27 Yes 1 -latin2_czech_cs latin2 2 Yes 4 -latin2_general_ci latin2 9 Yes Yes 1 -latin2_hungarian_ci latin2 21 Yes 1 -latin5_bin latin5 78 0 -latin5_turkish_ci latin5 30 Yes 0 -latin7_bin latin7 79 0 -latin7_estonian_cs latin7 20 0 -latin7_general_ci latin7 41 Yes 0 -latin7_general_cs latin7 42 0 -macce_bin macce 43 0 -macce_general_ci macce 38 Yes 0 -macroman_bin macroman 53 0 -macroman_general_ci macroman 39 Yes 0 -sjis_bin sjis 88 Yes 1 -sjis_japanese_ci sjis 13 Yes Yes 1 -swe7_bin swe7 82 0 -swe7_swedish_ci swe7 10 Yes 0 -tis620_bin tis620 89 Yes 1 -tis620_thai_ci tis620 18 Yes Yes 4 -ucs2_bin ucs2 90 Yes 1 -ucs2_czech_ci ucs2 138 Yes 8 -ucs2_danish_ci ucs2 139 Yes 8 -ucs2_esperanto_ci ucs2 145 Yes 8 -ucs2_estonian_ci ucs2 134 Yes 8 -ucs2_general_ci ucs2 35 Yes Yes 1 -ucs2_hungarian_ci ucs2 146 Yes 8 -ucs2_icelandic_ci ucs2 129 Yes 8 -ucs2_latvian_ci ucs2 130 Yes 8 -ucs2_lithuanian_ci ucs2 140 Yes 8 -ucs2_persian_ci ucs2 144 Yes 8 -ucs2_polish_ci ucs2 133 Yes 8 -ucs2_romanian_ci ucs2 131 Yes 8 -ucs2_roman_ci ucs2 143 Yes 8 -ucs2_slovak_ci ucs2 141 Yes 8 -ucs2_slovenian_ci ucs2 132 Yes 8 -ucs2_spanish2_ci ucs2 142 Yes 8 -ucs2_spanish_ci ucs2 135 Yes 8 -ucs2_swedish_ci ucs2 136 Yes 8 -ucs2_turkish_ci ucs2 137 Yes 8 -ucs2_unicode_ci ucs2 128 Yes 8 -ujis_bin ujis 91 Yes 1 -ujis_japanese_ci ujis 12 Yes Yes 1 -utf8_bin utf8 83 Yes 1 -utf8_czech_ci utf8 202 Yes 8 -utf8_danish_ci utf8 203 Yes 8 -utf8_esperanto_ci utf8 209 Yes 8 -utf8_estonian_ci utf8 198 Yes 8 -utf8_general_ci utf8 33 Yes Yes 1 -utf8_hungarian_ci utf8 210 Yes 8 -utf8_icelandic_ci utf8 193 Yes 8 -utf8_latvian_ci utf8 194 Yes 8 -utf8_lithuanian_ci utf8 204 Yes 8 -utf8_persian_ci utf8 208 Yes 8 -utf8_polish_ci utf8 197 Yes 8 -utf8_romanian_ci utf8 195 Yes 8 -utf8_roman_ci utf8 207 Yes 8 -utf8_slovak_ci utf8 205 Yes 8 -utf8_slovenian_ci utf8 196 Yes 8 -utf8_spanish2_ci utf8 206 Yes 8 -utf8_spanish_ci utf8 199 Yes 8 -utf8_swedish_ci utf8 200 Yes 8 -utf8_turkish_ci utf8 201 Yes 8 -utf8_unicode_ci utf8 192 Yes 8 - - -SELECT * -FROM information_schema.collation_character_set_applicability -ORDER BY collation_name, character_set_name; -COLLATION_NAME CHARACTER_SET_NAME -armscii8_bin armscii8 -armscii8_general_ci armscii8 -ascii_bin ascii -ascii_general_ci ascii -big5_bin big5 -big5_chinese_ci big5 -binary binary -cp1250_bin cp1250 -cp1250_croatian_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_general_ci cp1250 -cp1250_polish_ci cp1250 -cp1251_bin cp1251 -cp1251_bulgarian_ci cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1251_ukrainian_ci cp1251 -cp1256_bin cp1256 -cp1256_general_ci cp1256 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -cp1257_lithuanian_ci cp1257 -cp850_bin cp850 -cp850_general_ci cp850 -cp852_bin cp852 -cp852_general_ci cp852 -cp866_bin cp866 -cp866_general_ci cp866 -cp932_bin cp932 -cp932_japanese_ci cp932 -dec8_bin dec8 -dec8_swedish_ci dec8 -eucjpms_bin eucjpms -eucjpms_japanese_ci eucjpms -euckr_bin euckr -euckr_korean_ci euckr -filename filename -gb2312_bin gb2312 -gb2312_chinese_ci gb2312 -gbk_bin gbk -gbk_chinese_ci gbk -geostd8_bin geostd8 -geostd8_general_ci geostd8 -greek_bin greek -greek_general_ci greek -hebrew_bin hebrew -hebrew_general_ci hebrew -hp8_bin hp8 -hp8_english_ci hp8 -keybcs2_bin keybcs2 -keybcs2_general_ci keybcs2 -koi8r_bin koi8r -koi8r_general_ci koi8r -koi8u_bin koi8u -koi8u_general_ci koi8u -latin1_bin latin1 -latin1_danish_ci latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_german1_ci latin1 -latin1_german2_ci latin1 -latin1_spanish_ci latin1 -latin1_swedish_ci latin1 -latin2_bin latin2 -latin2_croatian_ci latin2 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin5_bin latin5 -latin5_turkish_ci latin5 -latin7_bin latin7 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -macce_bin macce -macce_general_ci macce -macroman_bin macroman -macroman_general_ci macroman -sjis_bin sjis -sjis_japanese_ci sjis -swe7_bin swe7 -swe7_swedish_ci swe7 -tis620_bin tis620 -tis620_thai_ci tis620 -ucs2_bin ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_general_ci ucs2 -ucs2_hungarian_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_unicode_ci ucs2 -ujis_bin ujis -ujis_japanese_ci ujis -utf8_bin utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_esperanto_ci utf8 -utf8_estonian_ci utf8 -utf8_general_ci utf8 -utf8_hungarian_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_lithuanian_ci utf8 -utf8_persian_ci utf8 -utf8_polish_ci utf8 -utf8_romanian_ci utf8 -utf8_roman_ci utf8 -utf8_slovak_ci utf8 -utf8_slovenian_ci utf8 -utf8_spanish2_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_unicode_ci utf8 -# Switch to connection default + disconnect con -DROP USER dbdict_test@localhost; diff --git a/mysql-test/suite/funcs_1/r/charset_collation_2.result b/mysql-test/suite/funcs_1/r/charset_collation_2.result deleted file mode 100644 index a9fb15a588c..00000000000 --- a/mysql-test/suite/funcs_1/r/charset_collation_2.result +++ /dev/null @@ -1,314 +0,0 @@ -DROP USER dbdict_test@localhost; -CREATE USER dbdict_test@localhost; -# Establish connection con (user=dbdict_test) - -SELECT * -FROM information_schema.character_sets -ORDER BY character_set_name; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -ascii ascii_general_ci US ASCII 1 -big5 big5_chinese_ci Big5 Traditional Chinese 2 -binary binary Binary pseudo charset 1 -cp1250 cp1250_general_ci Windows Central European 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -cp850 cp850_general_ci DOS West European 1 -cp852 cp852_general_ci DOS Central European 1 -cp866 cp866_general_ci DOS Russian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -dec8 dec8_swedish_ci DEC West European 1 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 -euckr euckr_korean_ci EUC-KR Korean 2 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -greek greek_general_ci ISO 8859-7 Greek 1 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -hp8 hp8_english_ci HP West European 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -swe7 swe7_swedish_ci 7bit Swedish 1 -tis620 tis620_thai_ci TIS620 Thai 1 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -ujis ujis_japanese_ci EUC-JP Japanese 3 -utf8 utf8_general_ci UTF-8 Unicode 3 - -SELECT * -FROM information_schema.collations -ORDER BY collation_name; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -armscii8_bin armscii8 64 0 -armscii8_general_ci armscii8 32 Yes 0 -ascii_bin ascii 65 0 -ascii_general_ci ascii 11 Yes 0 -big5_bin big5 84 Yes 1 -big5_chinese_ci big5 1 Yes Yes 1 -binary binary 63 Yes Yes 1 -cp1250_bin cp1250 66 Yes 1 -cp1250_croatian_ci cp1250 44 Yes 1 -cp1250_czech_cs cp1250 34 Yes 2 -cp1250_general_ci cp1250 26 Yes Yes 1 -cp1250_polish_ci cp1250 99 Yes 1 -cp1251_bin cp1251 50 0 -cp1251_bulgarian_ci cp1251 14 0 -cp1251_general_ci cp1251 51 Yes 0 -cp1251_general_cs cp1251 52 0 -cp1251_ukrainian_ci cp1251 23 0 -cp1256_bin cp1256 67 0 -cp1256_general_ci cp1256 57 Yes 0 -cp1257_bin cp1257 58 0 -cp1257_general_ci cp1257 59 Yes 0 -cp1257_lithuanian_ci cp1257 29 0 -cp850_bin cp850 80 0 -cp850_general_ci cp850 4 Yes 0 -cp852_bin cp852 81 0 -cp852_general_ci cp852 40 Yes 0 -cp866_bin cp866 68 0 -cp866_general_ci cp866 36 Yes 0 -cp932_bin cp932 96 Yes 1 -cp932_japanese_ci cp932 95 Yes Yes 1 -dec8_bin dec8 69 0 -dec8_swedish_ci dec8 3 Yes 0 -eucjpms_bin eucjpms 98 Yes 1 -eucjpms_japanese_ci eucjpms 97 Yes Yes 1 -euckr_bin euckr 85 Yes 1 -euckr_korean_ci euckr 19 Yes Yes 1 -gb2312_bin gb2312 86 Yes 1 -gb2312_chinese_ci gb2312 24 Yes Yes 1 -gbk_bin gbk 87 Yes 1 -gbk_chinese_ci gbk 28 Yes Yes 1 -geostd8_bin geostd8 93 0 -geostd8_general_ci geostd8 92 Yes 0 -greek_bin greek 70 0 -greek_general_ci greek 25 Yes 0 -hebrew_bin hebrew 71 0 -hebrew_general_ci hebrew 16 Yes 0 -hp8_bin hp8 72 0 -hp8_english_ci hp8 6 Yes 0 -keybcs2_bin keybcs2 73 0 -keybcs2_general_ci keybcs2 37 Yes 0 -koi8r_bin koi8r 74 0 -koi8r_general_ci koi8r 7 Yes 0 -koi8u_bin koi8u 75 0 -koi8u_general_ci koi8u 22 Yes 0 -latin1_bin latin1 47 Yes 1 -latin1_danish_ci latin1 15 Yes 1 -latin1_general_ci latin1 48 Yes 1 -latin1_general_cs latin1 49 Yes 1 -latin1_german1_ci latin1 5 Yes 1 -latin1_german2_ci latin1 31 Yes 2 -latin1_spanish_ci latin1 94 Yes 1 -latin1_swedish_ci latin1 8 Yes Yes 1 -latin2_bin latin2 77 Yes 1 -latin2_croatian_ci latin2 27 Yes 1 -latin2_czech_cs latin2 2 Yes 4 -latin2_general_ci latin2 9 Yes Yes 1 -latin2_hungarian_ci latin2 21 Yes 1 -latin5_bin latin5 78 0 -latin5_turkish_ci latin5 30 Yes 0 -latin7_bin latin7 79 0 -latin7_estonian_cs latin7 20 0 -latin7_general_ci latin7 41 Yes 0 -latin7_general_cs latin7 42 0 -macce_bin macce 43 0 -macce_general_ci macce 38 Yes 0 -macroman_bin macroman 53 0 -macroman_general_ci macroman 39 Yes 0 -sjis_bin sjis 88 Yes 1 -sjis_japanese_ci sjis 13 Yes Yes 1 -swe7_bin swe7 82 0 -swe7_swedish_ci swe7 10 Yes 0 -tis620_bin tis620 89 Yes 1 -tis620_thai_ci tis620 18 Yes Yes 4 -ucs2_bin ucs2 90 Yes 1 -ucs2_czech_ci ucs2 138 Yes 8 -ucs2_danish_ci ucs2 139 Yes 8 -ucs2_esperanto_ci ucs2 145 Yes 8 -ucs2_estonian_ci ucs2 134 Yes 8 -ucs2_general_ci ucs2 35 Yes Yes 1 -ucs2_hungarian_ci ucs2 146 Yes 8 -ucs2_icelandic_ci ucs2 129 Yes 8 -ucs2_latvian_ci ucs2 130 Yes 8 -ucs2_lithuanian_ci ucs2 140 Yes 8 -ucs2_persian_ci ucs2 144 Yes 8 -ucs2_polish_ci ucs2 133 Yes 8 -ucs2_romanian_ci ucs2 131 Yes 8 -ucs2_roman_ci ucs2 143 Yes 8 -ucs2_slovak_ci ucs2 141 Yes 8 -ucs2_slovenian_ci ucs2 132 Yes 8 -ucs2_spanish2_ci ucs2 142 Yes 8 -ucs2_spanish_ci ucs2 135 Yes 8 -ucs2_swedish_ci ucs2 136 Yes 8 -ucs2_turkish_ci ucs2 137 Yes 8 -ucs2_unicode_ci ucs2 128 Yes 8 -ujis_bin ujis 91 Yes 1 -ujis_japanese_ci ujis 12 Yes Yes 1 -utf8_bin utf8 83 Yes 1 -utf8_czech_ci utf8 202 Yes 8 -utf8_danish_ci utf8 203 Yes 8 -utf8_esperanto_ci utf8 209 Yes 8 -utf8_estonian_ci utf8 198 Yes 8 -utf8_general_ci utf8 33 Yes Yes 1 -utf8_general_cs utf8 254 Yes 1 -utf8_hungarian_ci utf8 210 Yes 8 -utf8_icelandic_ci utf8 193 Yes 8 -utf8_latvian_ci utf8 194 Yes 8 -utf8_lithuanian_ci utf8 204 Yes 8 -utf8_persian_ci utf8 208 Yes 8 -utf8_polish_ci utf8 197 Yes 8 -utf8_romanian_ci utf8 195 Yes 8 -utf8_roman_ci utf8 207 Yes 8 -utf8_slovak_ci utf8 205 Yes 8 -utf8_slovenian_ci utf8 196 Yes 8 -utf8_spanish2_ci utf8 206 Yes 8 -utf8_spanish_ci utf8 199 Yes 8 -utf8_swedish_ci utf8 200 Yes 8 -utf8_turkish_ci utf8 201 Yes 8 -utf8_unicode_ci utf8 192 Yes 8 - - -SELECT * -FROM information_schema.collation_character_set_applicability -ORDER BY collation_name, character_set_name; -COLLATION_NAME CHARACTER_SET_NAME -armscii8_bin armscii8 -armscii8_general_ci armscii8 -ascii_bin ascii -ascii_general_ci ascii -big5_bin big5 -big5_chinese_ci big5 -binary binary -cp1250_bin cp1250 -cp1250_croatian_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_general_ci cp1250 -cp1250_polish_ci cp1250 -cp1251_bin cp1251 -cp1251_bulgarian_ci cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1251_ukrainian_ci cp1251 -cp1256_bin cp1256 -cp1256_general_ci cp1256 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -cp1257_lithuanian_ci cp1257 -cp850_bin cp850 -cp850_general_ci cp850 -cp852_bin cp852 -cp852_general_ci cp852 -cp866_bin cp866 -cp866_general_ci cp866 -cp932_bin cp932 -cp932_japanese_ci cp932 -dec8_bin dec8 -dec8_swedish_ci dec8 -eucjpms_bin eucjpms -eucjpms_japanese_ci eucjpms -euckr_bin euckr -euckr_korean_ci euckr -filename filename -gb2312_bin gb2312 -gb2312_chinese_ci gb2312 -gbk_bin gbk -gbk_chinese_ci gbk -geostd8_bin geostd8 -geostd8_general_ci geostd8 -greek_bin greek -greek_general_ci greek -hebrew_bin hebrew -hebrew_general_ci hebrew -hp8_bin hp8 -hp8_english_ci hp8 -keybcs2_bin keybcs2 -keybcs2_general_ci keybcs2 -koi8r_bin koi8r -koi8r_general_ci koi8r -koi8u_bin koi8u -koi8u_general_ci koi8u -latin1_bin latin1 -latin1_danish_ci latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_german1_ci latin1 -latin1_german2_ci latin1 -latin1_spanish_ci latin1 -latin1_swedish_ci latin1 -latin2_bin latin2 -latin2_croatian_ci latin2 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin5_bin latin5 -latin5_turkish_ci latin5 -latin7_bin latin7 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -macce_bin macce -macce_general_ci macce -macroman_bin macroman -macroman_general_ci macroman -sjis_bin sjis -sjis_japanese_ci sjis -swe7_bin swe7 -swe7_swedish_ci swe7 -tis620_bin tis620 -tis620_thai_ci tis620 -ucs2_bin ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_general_ci ucs2 -ucs2_hungarian_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_unicode_ci ucs2 -ujis_bin ujis -ujis_japanese_ci ujis -utf8_bin utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_esperanto_ci utf8 -utf8_estonian_ci utf8 -utf8_general_ci utf8 -utf8_general_cs utf8 -utf8_hungarian_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_lithuanian_ci utf8 -utf8_persian_ci utf8 -utf8_polish_ci utf8 -utf8_romanian_ci utf8 -utf8_roman_ci utf8 -utf8_slovak_ci utf8 -utf8_slovenian_ci utf8 -utf8_spanish2_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_unicode_ci utf8 -# Switch to connection default + disconnect con -DROP USER dbdict_test@localhost; diff --git a/mysql-test/suite/funcs_1/r/charset_collation_3.result b/mysql-test/suite/funcs_1/r/charset_collation_3.result deleted file mode 100644 index 55ed4b4704c..00000000000 --- a/mysql-test/suite/funcs_1/r/charset_collation_3.result +++ /dev/null @@ -1,312 +0,0 @@ -DROP USER dbdict_test@localhost; -CREATE USER dbdict_test@localhost; -# Establish connection con (user=dbdict_test) - -SELECT * -FROM information_schema.character_sets -ORDER BY character_set_name; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -ascii ascii_general_ci US ASCII 1 -big5 big5_chinese_ci Big5 Traditional Chinese 2 -binary binary Binary pseudo charset 1 -cp1250 cp1250_general_ci Windows Central European 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -cp850 cp850_general_ci DOS West European 1 -cp852 cp852_general_ci DOS Central European 1 -cp866 cp866_general_ci DOS Russian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -dec8 dec8_swedish_ci DEC West European 1 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 -euckr euckr_korean_ci EUC-KR Korean 2 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -greek greek_general_ci ISO 8859-7 Greek 1 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -hp8 hp8_english_ci HP West European 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -swe7 swe7_swedish_ci 7bit Swedish 1 -tis620 tis620_thai_ci TIS620 Thai 1 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -ujis ujis_japanese_ci EUC-JP Japanese 3 -utf8 utf8_general_ci UTF-8 Unicode 3 - -SELECT * -FROM information_schema.collations -ORDER BY collation_name; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -armscii8_bin armscii8 64 0 -armscii8_general_ci armscii8 32 Yes 0 -ascii_bin ascii 65 0 -ascii_general_ci ascii 11 Yes 0 -big5_bin big5 84 Yes 1 -big5_chinese_ci big5 1 Yes Yes 1 -binary binary 63 Yes Yes 1 -cp1250_bin cp1250 66 Yes 1 -cp1250_croatian_ci cp1250 44 Yes 1 -cp1250_czech_cs cp1250 34 Yes 2 -cp1250_general_ci cp1250 26 Yes Yes 1 -cp1250_polish_ci cp1250 99 Yes 1 -cp1251_bin cp1251 50 0 -cp1251_bulgarian_ci cp1251 14 0 -cp1251_general_ci cp1251 51 Yes 0 -cp1251_general_cs cp1251 52 0 -cp1251_ukrainian_ci cp1251 23 0 -cp1256_bin cp1256 67 0 -cp1256_general_ci cp1256 57 Yes 0 -cp1257_bin cp1257 58 0 -cp1257_general_ci cp1257 59 Yes 0 -cp1257_lithuanian_ci cp1257 29 0 -cp850_bin cp850 80 0 -cp850_general_ci cp850 4 Yes 0 -cp852_bin cp852 81 0 -cp852_general_ci cp852 40 Yes 0 -cp866_bin cp866 68 0 -cp866_general_ci cp866 36 Yes 0 -cp932_bin cp932 96 Yes 1 -cp932_japanese_ci cp932 95 Yes Yes 1 -dec8_bin dec8 69 0 -dec8_swedish_ci dec8 3 Yes 0 -eucjpms_bin eucjpms 98 Yes 1 -eucjpms_japanese_ci eucjpms 97 Yes Yes 1 -euckr_bin euckr 85 Yes 1 -euckr_korean_ci euckr 19 Yes Yes 1 -gb2312_bin gb2312 86 Yes 1 -gb2312_chinese_ci gb2312 24 Yes Yes 1 -gbk_bin gbk 87 Yes 1 -gbk_chinese_ci gbk 28 Yes Yes 1 -geostd8_bin geostd8 93 0 -geostd8_general_ci geostd8 92 Yes 0 -greek_bin greek 70 0 -greek_general_ci greek 25 Yes 0 -hebrew_bin hebrew 71 0 -hebrew_general_ci hebrew 16 Yes 0 -hp8_bin hp8 72 0 -hp8_english_ci hp8 6 Yes 0 -keybcs2_bin keybcs2 73 0 -keybcs2_general_ci keybcs2 37 Yes 0 -koi8r_bin koi8r 74 0 -koi8r_general_ci koi8r 7 Yes 0 -koi8u_bin koi8u 75 0 -koi8u_general_ci koi8u 22 Yes 0 -latin1_bin latin1 47 Yes 1 -latin1_danish_ci latin1 15 Yes 1 -latin1_general_ci latin1 48 Yes 1 -latin1_general_cs latin1 49 Yes 1 -latin1_german1_ci latin1 5 Yes 1 -latin1_german2_ci latin1 31 Yes 2 -latin1_spanish_ci latin1 94 Yes 1 -latin1_swedish_ci latin1 8 Yes Yes 1 -latin2_bin latin2 77 Yes 1 -latin2_croatian_ci latin2 27 Yes 1 -latin2_czech_cs latin2 2 Yes 4 -latin2_general_ci latin2 9 Yes Yes 1 -latin2_hungarian_ci latin2 21 Yes 1 -latin5_bin latin5 78 0 -latin5_turkish_ci latin5 30 Yes 0 -latin7_bin latin7 79 0 -latin7_estonian_cs latin7 20 0 -latin7_general_ci latin7 41 Yes 0 -latin7_general_cs latin7 42 0 -macce_bin macce 43 0 -macce_general_ci macce 38 Yes 0 -macroman_bin macroman 53 0 -macroman_general_ci macroman 39 Yes 0 -sjis_bin sjis 88 Yes 1 -sjis_japanese_ci sjis 13 Yes Yes 1 -swe7_bin swe7 82 0 -swe7_swedish_ci swe7 10 Yes 0 -tis620_bin tis620 89 Yes 1 -tis620_thai_ci tis620 18 Yes Yes 4 -ucs2_bin ucs2 90 Yes 1 -ucs2_czech_ci ucs2 138 Yes 8 -ucs2_danish_ci ucs2 139 Yes 8 -ucs2_esperanto_ci ucs2 145 Yes 8 -ucs2_estonian_ci ucs2 134 Yes 8 -ucs2_general_ci ucs2 35 Yes Yes 1 -ucs2_hungarian_ci ucs2 146 Yes 8 -ucs2_icelandic_ci ucs2 129 Yes 8 -ucs2_latvian_ci ucs2 130 Yes 8 -ucs2_lithuanian_ci ucs2 140 Yes 8 -ucs2_persian_ci ucs2 144 Yes 8 -ucs2_polish_ci ucs2 133 Yes 8 -ucs2_romanian_ci ucs2 131 Yes 8 -ucs2_roman_ci ucs2 143 Yes 8 -ucs2_slovak_ci ucs2 141 Yes 8 -ucs2_slovenian_ci ucs2 132 Yes 8 -ucs2_spanish2_ci ucs2 142 Yes 8 -ucs2_spanish_ci ucs2 135 Yes 8 -ucs2_swedish_ci ucs2 136 Yes 8 -ucs2_turkish_ci ucs2 137 Yes 8 -ucs2_unicode_ci ucs2 128 Yes 8 -ujis_bin ujis 91 Yes 1 -ujis_japanese_ci ujis 12 Yes Yes 1 -utf8_bin utf8 83 Yes 1 -utf8_czech_ci utf8 202 Yes 8 -utf8_danish_ci utf8 203 Yes 8 -utf8_esperanto_ci utf8 209 Yes 8 -utf8_estonian_ci utf8 198 Yes 8 -utf8_general_ci utf8 33 Yes Yes 1 -utf8_hungarian_ci utf8 210 Yes 8 -utf8_icelandic_ci utf8 193 Yes 8 -utf8_latvian_ci utf8 194 Yes 8 -utf8_lithuanian_ci utf8 204 Yes 8 -utf8_persian_ci utf8 208 Yes 8 -utf8_polish_ci utf8 197 Yes 8 -utf8_romanian_ci utf8 195 Yes 8 -utf8_roman_ci utf8 207 Yes 8 -utf8_slovak_ci utf8 205 Yes 8 -utf8_slovenian_ci utf8 196 Yes 8 -utf8_spanish2_ci utf8 206 Yes 8 -utf8_spanish_ci utf8 199 Yes 8 -utf8_swedish_ci utf8 200 Yes 8 -utf8_turkish_ci utf8 201 Yes 8 -utf8_unicode_ci utf8 192 Yes 8 - - -SELECT * -FROM information_schema.collation_character_set_applicability -ORDER BY collation_name, character_set_name; -COLLATION_NAME CHARACTER_SET_NAME -armscii8_bin armscii8 -armscii8_general_ci armscii8 -ascii_bin ascii -ascii_general_ci ascii -big5_bin big5 -big5_chinese_ci big5 -binary binary -cp1250_bin cp1250 -cp1250_croatian_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_general_ci cp1250 -cp1250_polish_ci cp1250 -cp1251_bin cp1251 -cp1251_bulgarian_ci cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1251_ukrainian_ci cp1251 -cp1256_bin cp1256 -cp1256_general_ci cp1256 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -cp1257_lithuanian_ci cp1257 -cp850_bin cp850 -cp850_general_ci cp850 -cp852_bin cp852 -cp852_general_ci cp852 -cp866_bin cp866 -cp866_general_ci cp866 -cp932_bin cp932 -cp932_japanese_ci cp932 -dec8_bin dec8 -dec8_swedish_ci dec8 -eucjpms_bin eucjpms -eucjpms_japanese_ci eucjpms -euckr_bin euckr -euckr_korean_ci euckr -filename filename -gb2312_bin gb2312 -gb2312_chinese_ci gb2312 -gbk_bin gbk -gbk_chinese_ci gbk -geostd8_bin geostd8 -geostd8_general_ci geostd8 -greek_bin greek -greek_general_ci greek -hebrew_bin hebrew -hebrew_general_ci hebrew -hp8_bin hp8 -hp8_english_ci hp8 -keybcs2_bin keybcs2 -keybcs2_general_ci keybcs2 -koi8r_bin koi8r -koi8r_general_ci koi8r -koi8u_bin koi8u -koi8u_general_ci koi8u -latin1_bin latin1 -latin1_danish_ci latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_german1_ci latin1 -latin1_german2_ci latin1 -latin1_spanish_ci latin1 -latin1_swedish_ci latin1 -latin2_bin latin2 -latin2_croatian_ci latin2 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin5_bin latin5 -latin5_turkish_ci latin5 -latin7_bin latin7 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -macce_bin macce -macce_general_ci macce -macroman_bin macroman -macroman_general_ci macroman -sjis_bin sjis -sjis_japanese_ci sjis -swe7_bin swe7 -swe7_swedish_ci swe7 -tis620_bin tis620 -tis620_thai_ci tis620 -ucs2_bin ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_general_ci ucs2 -ucs2_hungarian_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_unicode_ci ucs2 -ujis_bin ujis -ujis_japanese_ci ujis -utf8_bin utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_esperanto_ci utf8 -utf8_estonian_ci utf8 -utf8_general_ci utf8 -utf8_hungarian_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_lithuanian_ci utf8 -utf8_persian_ci utf8 -utf8_polish_ci utf8 -utf8_romanian_ci utf8 -utf8_roman_ci utf8 -utf8_slovak_ci utf8 -utf8_slovenian_ci utf8 -utf8_spanish2_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_unicode_ci utf8 -# Switch to connection default + disconnect con -DROP USER dbdict_test@localhost; diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result index d5e1309e39f..59ad695c413 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result @@ -166,7 +166,7 @@ NULL information_schema PROCESSLIST HOST 3 NO varchar 64 192 NULL NULL utf8 utf NULL information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) NULL information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext NULL information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) -NULL information_schema PROCESSLIST TIME 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(7) +NULL information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL int(7) NULL information_schema PROCESSLIST USER 2 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) @@ -340,6 +340,7 @@ ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME NULL bigint NULL NULL NULL datetime NULL NULL +NULL int NULL NULL --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, @@ -519,7 +520,7 @@ NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4) 3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PROCESSLIST DB varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PROCESSLIST COMMAND varchar 16 48 utf8 utf8_general_ci varchar(16) -NULL information_schema PROCESSLIST TIME bigint NULL NULL NULL NULL bigint(7) +NULL information_schema PROCESSLIST TIME int NULL NULL NULL NULL int(7) 3.0000 information_schema PROCESSLIST STATE varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 information_schema PROCESSLIST INFO longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result index d22c5cc06f7..2721dcf3c6e 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result @@ -514,7 +514,7 @@ NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1 NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime @@ -547,32 +547,32 @@ NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) u NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) NULL test tb3 f119 2 NO char 1 1 NULL NULL latin1 latin1_bin char(1) NULL test tb3 f120 3 NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) @@ -646,33 +646,33 @@ NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000 NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f191 16 88.8 NO double NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb4 f192 17 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f193 18 00000000000000000088.8 NO double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f195 20 55.5 NO double NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb4 f196 21 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f197 22 00000000000000000055.5 NO double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f199 24 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb4 f200 25 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f201 26 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned zerofill NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f204 29 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb4 f205 30 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb4 f206 31 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f207 32 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f208 33 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f209 34 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned zerofill NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f212 37 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned +NULL test tb4 f213 38 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned +NULL test tb4 f214 39 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f215 40 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test tb4 f216 41 NULL YES float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime @@ -698,7 +698,7 @@ NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary NULL test tb4 f240 65 NULL YES varchar 120 120 NULL NULL latin1 latin1_swedish_ci varchar(120) NULL test tb4 f241 66 NULL YES char 100 100 NULL NULL latin1 latin1_swedish_ci char(100) NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) -NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime @@ -731,32 +731,32 @@ NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double -NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f74 16 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned +NULL test1 tb2 f75 17 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f76 18 NULL YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double -NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f78 20 7.7 YES double NULL NULL 22 NULL NULL NULL double unsigned +NULL test1 tb2 f79 21 00000000000000000007.7 YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f80 22 00000000000000000008.8 YES double NULL NULL 22 NULL NULL NULL double unsigned zerofill NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float -NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f82 24 8.8 NO float NULL NULL 12 NULL NULL NULL float unsigned +NULL test1 tb2 f83 25 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f84 26 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float -NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f87 29 8.8 NO float NULL NULL 12 NULL NULL NULL float unsigned +NULL test1 tb2 f88 30 8.8 NO float NULL NULL 12 NULL NULL NULL float unsigned +NULL test1 tb2 f89 31 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f90 32 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f91 33 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f92 34 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double -NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned -NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned -NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f95 37 8.8 NO float NULL NULL 12 NULL NULL NULL float unsigned +NULL test1 tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL double unsigned +NULL test1 tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL float unsigned zerofill NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date @@ -817,11 +817,7 @@ NULL date NULL NULL NULL datetime NULL NULL NULL decimal NULL NULL NULL double NULL NULL -NULL double unsigned NULL NULL -NULL double unsigned zerofill NULL NULL NULL float NULL NULL -NULL float unsigned NULL NULL -NULL float unsigned zerofill NULL NULL NULL int NULL NULL NULL mediumint NULL NULL NULL smallint NULL NULL @@ -963,33 +959,33 @@ NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill NULL test tb2 f73 double NULL NULL NULL NULL double -NULL test tb2 f74 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f74 double NULL NULL NULL NULL double unsigned +NULL test tb2 f75 double NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f76 double NULL NULL NULL NULL double unsigned zerofill NULL test tb2 f77 double NULL NULL NULL NULL double -NULL test tb2 f78 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f78 double NULL NULL NULL NULL double unsigned +NULL test tb2 f79 double NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f80 double NULL NULL NULL NULL double unsigned zerofill NULL test tb2 f81 float NULL NULL NULL NULL float -NULL test tb2 f82 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f82 float NULL NULL NULL NULL float unsigned +NULL test tb2 f83 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f84 float NULL NULL NULL NULL float unsigned zerofill NULL test tb2 f85 float NULL NULL NULL NULL float NULL test tb2 f86 float NULL NULL NULL NULL float -NULL test tb2 f87 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f88 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f87 float NULL NULL NULL NULL float unsigned +NULL test tb2 f88 float NULL NULL NULL NULL float unsigned +NULL test tb2 f89 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f90 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f91 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f92 float NULL NULL NULL NULL float unsigned zerofill NULL test tb2 f93 float NULL NULL NULL NULL float NULL test tb2 f94 double NULL NULL NULL NULL double -NULL test tb2 f95 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f96 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f95 float NULL NULL NULL NULL float unsigned +NULL test tb2 f96 double NULL NULL NULL NULL double unsigned +NULL test tb2 f97 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f98 double NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f99 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f100 double NULL NULL NULL NULL double unsigned zerofill NULL test tb2 f101 date NULL NULL NULL NULL date NULL test tb2 f102 time NULL NULL NULL NULL time NULL test tb2 f103 datetime NULL NULL NULL NULL datetime @@ -1080,33 +1076,33 @@ NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill NULL test tb4 f190 double NULL NULL NULL NULL double -NULL test tb4 f191 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f192 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f193 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f191 double NULL NULL NULL NULL double unsigned +NULL test tb4 f192 double NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f193 double NULL NULL NULL NULL double unsigned zerofill NULL test tb4 f194 double NULL NULL NULL NULL double -NULL test tb4 f195 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f196 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f197 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f195 double NULL NULL NULL NULL double unsigned +NULL test tb4 f196 double NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f197 double NULL NULL NULL NULL double unsigned zerofill NULL test tb4 f198 float NULL NULL NULL NULL float -NULL test tb4 f199 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f200 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f201 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f199 float NULL NULL NULL NULL float unsigned +NULL test tb4 f200 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f201 float NULL NULL NULL NULL float unsigned zerofill NULL test tb4 f202 float NULL NULL NULL NULL float NULL test tb4 f203 float NULL NULL NULL NULL float -NULL test tb4 f204 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f205 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f206 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f207 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f208 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f209 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f204 float NULL NULL NULL NULL float unsigned +NULL test tb4 f205 float NULL NULL NULL NULL float unsigned +NULL test tb4 f206 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f207 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f208 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f209 float NULL NULL NULL NULL float unsigned zerofill NULL test tb4 f210 float NULL NULL NULL NULL float NULL test tb4 f211 double NULL NULL NULL NULL double -NULL test tb4 f212 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f213 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f214 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f215 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f216 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f217 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f212 float NULL NULL NULL NULL float unsigned +NULL test tb4 f213 double NULL NULL NULL NULL double unsigned +NULL test tb4 f214 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f215 double NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f216 float NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f217 double NULL NULL NULL NULL double unsigned zerofill NULL test tb4 f218 date NULL NULL NULL NULL date NULL test tb4 f219 time NULL NULL NULL NULL time NULL test tb4 f220 datetime NULL NULL NULL NULL datetime @@ -1147,33 +1143,33 @@ NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill NULL test1 tb2 f73 double NULL NULL NULL NULL double -NULL test1 tb2 f74 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f74 double NULL NULL NULL NULL double unsigned +NULL test1 tb2 f75 double NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f76 double NULL NULL NULL NULL double unsigned zerofill NULL test1 tb2 f77 double NULL NULL NULL NULL double -NULL test1 tb2 f78 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f78 double NULL NULL NULL NULL double unsigned +NULL test1 tb2 f79 double NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f80 double NULL NULL NULL NULL double unsigned zerofill NULL test1 tb2 f81 float NULL NULL NULL NULL float -NULL test1 tb2 f82 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f82 float NULL NULL NULL NULL float unsigned +NULL test1 tb2 f83 float NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f84 float NULL NULL NULL NULL float unsigned zerofill NULL test1 tb2 f85 float NULL NULL NULL NULL float NULL test1 tb2 f86 float NULL NULL NULL NULL float -NULL test1 tb2 f87 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f88 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f87 float NULL NULL NULL NULL float unsigned +NULL test1 tb2 f88 float NULL NULL NULL NULL float unsigned +NULL test1 tb2 f89 float NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f90 float NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f91 float NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f92 float NULL NULL NULL NULL float unsigned zerofill NULL test1 tb2 f93 float NULL NULL NULL NULL float NULL test1 tb2 f94 double NULL NULL NULL NULL double -NULL test1 tb2 f95 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f96 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f95 float NULL NULL NULL NULL float unsigned +NULL test1 tb2 f96 double NULL NULL NULL NULL double unsigned +NULL test1 tb2 f97 float NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f98 double NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f99 float NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f100 double NULL NULL NULL NULL double unsigned zerofill NULL test1 tb2 f101 date NULL NULL NULL NULL date NULL test1 tb2 f102 time NULL NULL NULL NULL time NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result index 1d37a87f868..9c9d3cd26de 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result @@ -48,7 +48,7 @@ NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NUL NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp NULL mysql event name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') -NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned NULL mysql event sql_mode 15 NO set 478 1434 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') @@ -60,7 +60,7 @@ NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('fu NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP -NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) +NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI @@ -150,7 +150,7 @@ NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) -NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) +NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext @@ -329,7 +329,7 @@ NULL mysql event ends datetime NULL NULL NULL NULL datetime 3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE') 3.0000 mysql event sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') 3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64) -NULL mysql event originator int NULL NULL NULL NULL int(10) +NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned 1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64) 3.0000 mysql event character_set_client char 32 96 utf8 utf8_bin char(32) 3.0000 mysql event collation_connection char 32 96 utf8 utf8_bin char(32) @@ -342,7 +342,7 @@ NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp 1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql general_log thread_id int NULL NULL NULL NULL int(11) -NULL mysql general_log server_id int NULL NULL NULL NULL int(11) +NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned @@ -434,7 +434,7 @@ NULL mysql slow_log rows_examined int NULL NULL NULL NULL int(11) 3.0000 mysql slow_log db varchar 512 1536 utf8 utf8_general_ci varchar(512) NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11) NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11) -NULL mysql slow_log server_id int NULL NULL NULL NULL int(11) +NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned 1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext 3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index 7e21ddf1544..3efb361dc82 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -18241,8 +18241,6 @@ END// CALL sp70_n(-1e+40); f1 -10000000000000000000000000000000000000000 -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 CALL sp70_n( -10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000 @@ -18255,8 +18253,6 @@ END// CALL sp71_nu(1.00e+40); f1 10000000000000000000000000000000000000000 -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 CALL sp71_nu( 10000000000000000000000000000000000000000 ); f1 10000000000000000000000000000000000000000 @@ -18269,8 +18265,6 @@ END// CALL sp72_nuz(1.00e+40); f1 0000000000000000000000010000000000000000000000000000000000000000 -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 CALL sp72_nuz( 10000000000000000000000000000000000000000 ); f1 0000000000000000000000010000000000000000000000000000000000000000 @@ -18283,8 +18277,6 @@ END// CALL sp73_n_z(1.00e+40); f1 0000000000000000000000010000000000000000000000000000000000000000 -Warnings: -Note 1265 Data truncated for column 'f1' at row 1 CALL sp73_n_z( 10000000000000000000000000000000000000000 ); f1 0000000000000000000000010000000000000000000000000000000000000000 diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc index d0fc6092959..f2df99fb5a3 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc @@ -53,7 +53,6 @@ flush privileges; DROP PROCEDURE IF EXISTS sp1; --enable_warnings -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (user1a, localhost, user_1, , db_storedproc_1); --source suite/funcs_1/include/show_connection.inc diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc index 69378541b51..83f5f2105c5 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc @@ -58,7 +58,6 @@ GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost'; GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost'; FLUSH PRIVILEGES; -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (user2_1, localhost, user_1, , db_storedproc); --source suite/funcs_1/include/show_connection.inc diff --git a/mysql-test/suite/funcs_1/datadict/charset_collation.inc b/mysql-test/suite/funcs_1/t/charset_collation.test index a1991346cfc..186eb1f5b85 100644 --- a/mysql-test/suite/funcs_1/datadict/charset_collation.inc +++ b/mysql-test/suite/funcs_1/t/charset_collation.test @@ -1,58 +1,16 @@ -# suite/funcs_1/datadict/charset_collation.inc +# suite/funcs_1/t/charset_collation.test # # Tests checking the content of the information_schema tables # character_sets # collations # collation_character_set_applicability # -# -# The amount and properties of character_sets/collations depend on the -# build type -# 2007-12 MySQL 5.0, 2008-06 MySQL 5.1 -# --------------------------------------------------------------------- -# -# Variant 1 fits to -# version_comment MySQL Enterprise Server (Commercial) -# version_comment MySQL Enterprise Server (GPL) -# version_comment MySQL Classic Server (Commercial) -# version_comment MySQL Pushbuild Edition, build <number> -# (version_comment Source distribution -# and -# compile was without "max" - > no collation 'utf8_general_ci') -# -# Variant 2 fits to -# version_comment MySQL Enterprise Server (GPL) -# version_comment MySQL Classic Server (Commercial) -# version_comment MySQL Pushbuild Edition, build <number> -# (version_comment Source distribution -# and -# compile was without "max" - > collation 'utf8_general_ci' exists) -# -# Difference between variant 1 and 2 is the collation 'utf8_general_ci'. -# -# Variant 3 fits to -# version_comment MySQL Community Server (GPL) -# version_comment MySQL Cluster Server (Commercial) -# version_comment MySQL Advanced Server (GPL) 5.1 -# version_comment MySQL Advanced Server (Commercial) 5.1 -# -# Difference between variant 3 and 2 is within the collation properties -# IS_COMPILED and SORTLEN. -# -# 2008-06 All time excluded variant is "vanilla". -# How to build "vanilla": -# ./BUILD/autorun.sh -# ./configure -# ./make -# Some properties of "vanilla" -# version_comment Source distribution -# Compared to the variants 1 to 3 a lot of character sets are missing. -# Example: "ucs2_bin" is in variant 1 to 3 but not in "vanilla". -# # Created: -# 2007-12-18 mleich - remove the unstable character_set/collation subtests -# from include/datadict-master.inc -# - create this new test +# 2009-04-28 mleich Replace the charset_collation_* test which failed too often +# because of changes +# - in general available character sets and collations +# - in build types +# (Bug#40545, Bug#40209, Bug#40618, Bug#38346) # # Create a low privileged user. @@ -61,8 +19,6 @@ DROP USER dbdict_test@localhost; CREATE USER dbdict_test@localhost; --echo # Establish connection con (user=dbdict_test) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (con,localhost,dbdict_test,,); ################################################################################ # @@ -98,32 +54,48 @@ connect (con,localhost,dbdict_test,,); # combinations for which the current user and PUBLIC have no # USAGE privilege. # -# Notes (2007-12-19 mleich): +# Notes (2009-04-28 mleich): # - The requirements are outdated because grant/revoke privilege for using a # characterset/collation were never implemented. -# Therefore the tests should simply check the content of these tables. -# +# Therefore the tests focus on the completeness and correctness of the +# content (rows and columns) of these tables. # - The amount of collations/character sets grows with new MySQL releases. -# -# - Even within the same release the amount of records within these tables +# Even within the same release the amount of records within these tables # can differ between different build types (community, enterprise, source,...) -# +# Therefore we limit the queries to character sets and collations which +# - exist in all build types +# - have in all build types the same "state". +# The character set +# - utf8 is used for Metadata +# - ascii is a quite usual +# The collations <character set>_general_ci and <character set>_bin seem +# to be available all time. # ################################################################################ + +let $char_set_condition= character_set_name IN ('utf8','latin1','binary'); +let $collation_condition= + (collation_name LIKE CONCAT(character_set_name,'_general_ci') + OR + collation_name LIKE CONCAT(character_set_name,'_bin')); --echo -SELECT * +eval SELECT * FROM information_schema.character_sets +WHERE $char_set_condition ORDER BY character_set_name; --echo -SELECT * +eval SELECT * FROM information_schema.collations +WHERE $char_set_condition + AND $collation_condition ORDER BY collation_name; -echo; --echo -SELECT * +eval SELECT * FROM information_schema.collation_character_set_applicability +WHERE $char_set_condition + AND $collation_condition ORDER BY collation_name, character_set_name; diff --git a/mysql-test/suite/funcs_1/t/charset_collation_1.test b/mysql-test/suite/funcs_1/t/charset_collation_1.test deleted file mode 100644 index 15777062a72..00000000000 --- a/mysql-test/suite/funcs_1/t/charset_collation_1.test +++ /dev/null @@ -1,32 +0,0 @@ -# Tests checking the content of the information_schema tables -# character_sets -# collations -# collation_character_set_applicability -# -# Content variant 1 which should fit to -# Enterprise or Classic builds (binaries provided by MySQL) -# Pushbuilds -# Source builds without "max" -# -# Please read suite/funcs_1/datadict/charset_collation.inc for -# additional information. -# -# Created: -# 2007-12-18 mleich - remove the unstable character_set/collation subtests -# from include/datadict-master.inc -# - create this new test -# - -if (`SELECT EXISTS (SELECT 1 FROM information_schema.collations - WHERE collation_name = 'utf8_general_cs') - OR ( @@version_comment NOT LIKE '%Source%' - AND @@version_comment NOT LIKE '%Enterprise%' - AND @@version_comment NOT LIKE '%Classic%' - AND @@version_comment NOT LIKE '%Pushbuild%') - OR (SELECT count(*) = 0 FROM information_schema.collations - WHERE collation_name = 'ucs2_bin')`) -{ - skip Test needs Enterprise, Classic , regular Pushbuild or Source-without-max build; -} - ---source suite/funcs_1/datadict/charset_collation.inc diff --git a/mysql-test/suite/funcs_1/t/charset_collation_2.test b/mysql-test/suite/funcs_1/t/charset_collation_2.test deleted file mode 100644 index d4924953b7d..00000000000 --- a/mysql-test/suite/funcs_1/t/charset_collation_2.test +++ /dev/null @@ -1,24 +0,0 @@ -# Tests checking the content of the information_schema tables -# character_sets -# collations -# collation_character_set_applicability -# -# Content variant 2 (compile from source with "max") -# -# Please read suite/funcs_1/datadict/charset_collation.inc for -# additional information. -# -# Created: -# 2007-12-18 mleich - remove the unstable character_set/collation subtests -# from include/datadict-master.inc -# - create this new test -# - -if (`SELECT @@version_comment NOT LIKE '%Source%' - OR NOT EXISTS (SELECT 1 FROM information_schema.collations - WHERE collation_name = 'utf8_general_cs')`) -{ - skip Test needs Source build with "max"; -} - ---source suite/funcs_1/datadict/charset_collation.inc diff --git a/mysql-test/suite/funcs_1/t/charset_collation_3.test b/mysql-test/suite/funcs_1/t/charset_collation_3.test deleted file mode 100644 index e88b44e4a0f..00000000000 --- a/mysql-test/suite/funcs_1/t/charset_collation_3.test +++ /dev/null @@ -1,25 +0,0 @@ -# Tests checking the content of the information_schema tables -# character_sets -# collations -# collation_character_set_applicability -# -# Content variant 3 which should fit to -# Community and Cluster builds (binaries provided by MySQL) -# -# Please read suite/funcs_1/datadict/charset_collation.inc for -# additional information. -# -# Created: -# 2007-12-18 mleich - remove the unstable character_set/collation subtests -# from include/datadict-master.inc -# - create this new test -# - -if (`SELECT @@version_comment NOT LIKE '%Community%' - AND @@version_comment NOT LIKE '%Cluster%' - AND @@version_comment NOT LIKE '%Advanced%'`) -{ - skip Test needs Community, Cluster or Advanced build; -} - ---source suite/funcs_1/datadict/charset_collation.inc diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index 69a69c60708..3f260ca49ba 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -11,6 +11,3 @@ ############################################################################## ndb_trig_1011ext: Bug#32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL -charset_collation_1: Bug#38346, Bug#40209, Bug#40545, Bug#40618 -charset_collation_2: Bug#38346, Bug#40209, Bug#40545, Bug#40618 -charset_collation_3: Bug#38346, Bug#40209, Bug#40545, Bug#40618 diff --git a/mysql-test/suite/funcs_1/t/is_basics_mixed.test b/mysql-test/suite/funcs_1/t/is_basics_mixed.test index 7d03dc5f8b0..235b91c67d0 100644 --- a/mysql-test/suite/funcs_1/t/is_basics_mixed.test +++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test @@ -55,7 +55,6 @@ DROP USER 'testuser1'@'localhost'; CREATE USER 'testuser1'@'localhost'; # Low privileged user --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , test); SELECT DATABASE(); diff --git a/mysql-test/suite/funcs_1/t/is_column_privileges.test b/mysql-test/suite/funcs_1/t/is_column_privileges.test index 925d07b9657..cb8c50c01b7 100644 --- a/mysql-test/suite/funcs_1/t/is_column_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_column_privileges.test @@ -132,7 +132,6 @@ WITH GRANT OPTION; eval $select; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); eval $select; diff --git a/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test index 98d01c60838..33269fe929c 100644 --- a/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test +++ b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test @@ -46,7 +46,6 @@ eval $my_show2; eval $my_show3; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); eval $my_select; diff --git a/mysql-test/suite/funcs_1/t/is_columns.test b/mysql-test/suite/funcs_1/t/is_columns.test index 20b832ca5c3..efb52acd48c 100644 --- a/mysql-test/suite/funcs_1/t/is_columns.test +++ b/mysql-test/suite/funcs_1/t/is_columns.test @@ -148,7 +148,6 @@ eval $my_show2; eval $my_show3; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); --source suite/funcs_1/datadict/datadict_bug_12777.inc diff --git a/mysql-test/suite/funcs_1/t/is_schema_privileges.test b/mysql-test/suite/funcs_1/t/is_schema_privileges.test index c1fc70b03f7..1f408d71b39 100644 --- a/mysql-test/suite/funcs_1/t/is_schema_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_schema_privileges.test @@ -116,7 +116,6 @@ let $show_testuser1 = SHOW GRANTS FOR 'testuser1'@'localhost'; let $show_testuser2 = SHOW GRANTS FOR 'testuser2'@'localhost'; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , test); GRANT SELECT ON db_datadict_4.* TO 'testuser2'@'localhost'; diff --git a/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test index d7b703ed04a..3f60f71fe9a 100644 --- a/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test +++ b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test @@ -46,7 +46,6 @@ eval $my_show2; eval $my_show3; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); eval $my_select; diff --git a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test index b5f13ab323c..9bfbf0cf335 100644 --- a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test +++ b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test @@ -46,7 +46,6 @@ eval $my_show2; eval $my_show3; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); eval $my_select; diff --git a/mysql-test/suite/funcs_1/t/is_statistics.test b/mysql-test/suite/funcs_1/t/is_statistics.test index e202e7392ea..458892a6d91 100644 --- a/mysql-test/suite/funcs_1/t/is_statistics.test +++ b/mysql-test/suite/funcs_1/t/is_statistics.test @@ -140,7 +140,6 @@ eval $my_show1; eval $my_show2; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , test); # nothing visible for testuser1 diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints.test b/mysql-test/suite/funcs_1/t/is_table_constraints.test index 730e805c91e..a64b3bfaa6e 100644 --- a/mysql-test/suite/funcs_1/t/is_table_constraints.test +++ b/mysql-test/suite/funcs_1/t/is_table_constraints.test @@ -132,7 +132,6 @@ eval $my_show1; eval $my_show2; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); SHOW GRANTS FOR 'testuser1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/t/is_table_privileges.test b/mysql-test/suite/funcs_1/t/is_table_privileges.test index 27ce22816a2..5ea0dd7c6a7 100644 --- a/mysql-test/suite/funcs_1/t/is_table_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_table_privileges.test @@ -116,7 +116,6 @@ WHERE table_name LIKE 'tb%' ORDER BY grantee,table_schema,table_name,privilege_type; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); --replace_result $other_engine_type <other_engine_type> diff --git a/mysql-test/suite/funcs_1/t/is_user_privileges.test b/mysql-test/suite/funcs_1/t/is_user_privileges.test index 5f8c29ca39d..1d0d3e51aae 100644 --- a/mysql-test/suite/funcs_1/t/is_user_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test @@ -114,7 +114,6 @@ eval $my_select1; eval $my_select2; --echo # Establish connection testuser1 (user=testuser1) -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); eval $my_select1; diff --git a/mysql-test/suite/funcs_1/t/myisam_views.test b/mysql-test/suite/funcs_1/t/myisam_views.test index 461bc0e3549..fe72843cfaf 100644 --- a/mysql-test/suite/funcs_1/t/myisam_views.test +++ b/mysql-test/suite/funcs_1/t/myisam_views.test @@ -1,5 +1,7 @@ #### suite/funcs_1/t/myisam_views.test +--source include/no_valgrind_without_big.inc + # MyISAM tables should be used # # Set $engine_type diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_06.tes b/mysql-test/suite/funcs_1/t/ndb_storedproc_06.tes deleted file mode 100644 index ce061da2299..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_06.tes +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/innodb_storedproc_06.test -# -# 1. Check if InnoDB is available ---source include/have_innodb.inc - -# 2. Set $engine_type -let $engine_type= innodb; - ---source suite/funcs_1/storedproc/storedproc_06.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_08.tes b/mysql-test/suite/funcs_1/t/ndb_storedproc_08.tes deleted file mode 100644 index c8c289c5f49..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_08.tes +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/innodb_storedproc_08.test -# -# 1. Check if InnoDB is available ---source include/have_innodb.inc - -# 2. Set $engine_type -let $engine_type= innodb; - ---source suite/funcs_1/storedproc/storedproc_08.inc diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test index 6877b751ed2..16c4d61bf58 100644 --- a/mysql-test/suite/funcs_1/t/storedproc.test +++ b/mysql-test/suite/funcs_1/t/storedproc.test @@ -10,6 +10,17 @@ # ############################################################################ +# Bug#37746 - Arithmetic range ("int") is smaller than expected +# This code is in place to ensure this test is only skipped +# for the Win64 platform +if(`SELECT CONVERT(@@version_compile_os using latin1) IN ("Win64")`) +{ +--skip Bug#37746 2009-07-07 pcrews Arithmetic range ("int") is smaller than expected +} + + + + # This test cannot be used for the embedded server because we check here # privileges. --source include/not_embedded.inc @@ -817,7 +828,6 @@ CREATE PROCEDURE sp11() insert into mysql.t1 values('a'); --replace_column 13 created 14 modified SELECT security_type from mysql.proc where specific_name='sp11'; -let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (u_1, localhost, user_1, , db_storedproc); --source suite/funcs_1/include/show_connection.inc @@ -22430,7 +22440,9 @@ BEGIN END// delimiter ;// +--disable_warnings CALL sp70_n(-1e+40); +--enable_warnings eval CALL sp70_n( $minus_40 ); @@ -22446,7 +22458,9 @@ BEGIN END// delimiter ;// +--disable_warnings CALL sp71_nu(1.00e+40); +--enable_warnings eval CALL sp71_nu( $plus_40 ); @@ -22462,7 +22476,9 @@ BEGIN END// delimiter ;// +--disable_warnings CALL sp72_nuz(1.00e+40); +--enable_warnings eval CALL sp72_nuz( $plus_40 ); @@ -22478,7 +22494,9 @@ BEGIN END// delimiter ;// +--disable_warnings CALL sp73_n_z(1.00e+40); +--enable_warnings eval CALL sp73_n_z( $plus_40 ); diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03.inc b/mysql-test/suite/funcs_1/triggers/triggers_03.inc index e5bea5b2005..9ef6a9ac9af 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc @@ -62,7 +62,6 @@ let $message= Testcase 3.5.3.2/6:; grant SELECT on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc index 60928ba8f35..475063587d4 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc @@ -36,7 +36,6 @@ let $message= ####### Testcase for column privileges of triggers: #######; grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc index cb9d8ddc78b..e5933eb84a8 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc @@ -37,7 +37,6 @@ let $message= Testcase for db level:; show grants for test_noprivs@localhost; # no trigger privilege->create trigger must fail: - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); let $message= no trigger privilege on db level for create:; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc index de9cf61f641..82f4a28f664 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc @@ -41,7 +41,6 @@ let $message= ####### Testcase for mix of db and table level: #######; grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); use priv1_db; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc index 18c8a3ebcd5..f1efff990f1 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc @@ -27,7 +27,6 @@ let $message= ######### Testcase for definer: ########; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc index cd90d25aefd..b6f4af7e0a7 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc @@ -38,7 +38,6 @@ let $message= #### Testcase for mix of user(global) and db level: ####; grant SELECT,INSERT on *.* to test_noprivs@localhost; show grants for test_noprivs@localhost; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc index f1b3bbe2cb4..ea7c385768c 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc @@ -32,7 +32,6 @@ let $message= #### Testcase for trigger privilege on execution time ########; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc index 9cc272c09bc..94f30fe13c2 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc @@ -30,7 +30,6 @@ let $message= ######### Testcase for table level: ########; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc index 53ce49c728c..e43f4ce97a3 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc @@ -27,7 +27,6 @@ let $message= ######### Testcase for transactions: ########; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc index af45017ae6a..d68b3d79086 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc @@ -22,7 +22,6 @@ let $message= Testcase: 3.5:; create User test_super@localhost; set password for test_super@localhost = password('PWD'); grant ALL on *.* to test_super@localhost with grant OPTION; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (con1_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK diff --git a/mysql-test/suite/funcs_1/triggers/triggers_08.inc b/mysql-test/suite/funcs_1/triggers/triggers_08.inc index 4b4050b996d..087f18e8e6b 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_08.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc @@ -23,7 +23,6 @@ let $message= Testcase: 3.5:; create User test_super@localhost; set password for test_super@localhost = password('PWD'); grant ALL on *.* to test_super@localhost with grant OPTION; - let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK connect (con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result new file mode 100644 index 00000000000..916e1d93ee5 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result @@ -0,0 +1,33 @@ +drop table if exists t1; +create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i; +insert into t1 values ("ch"),("h"),("i"); +select * from t1 order by c; +c +h +ch +i +drop table t1; +create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i; +insert into t1 values ("ch"),("h"),("i"); +select * from t1 order by c; +c +h +ch +i +drop table t1; +create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i; +insert into t1 values("abc"),("abcd"),("aaaa"); +select c from t1 order by c; +c +abc +abcd +aaaa +drop table t1; +create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i; +insert into t1 values("abc"),("abcd"),("aaaa"); +select c from t1 order by c; +c +abc +abcd +aaaa +drop table t1; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result new file mode 100644 index 00000000000..2392b746877 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result @@ -0,0 +1,7 @@ +drop table if exists t1; +create table t1 (c char(10), index(c)) charset macce engine=ibmdb2i; +insert into t1 values ("test"); +select * from t1 order by c; +c +test +drop table t1; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result new file mode 100644 index 00000000000..b9f4dcfc656 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result @@ -0,0 +1,20 @@ +set ibmdb2i_create_index_option=1; +drop schema if exists test1; +create schema test1; +use test1; +CREATE TABLE t1 (f int primary key, index(f)) engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (f char(10) collate utf8_bin primary key, index(f)) engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, index(f)) engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, i int, index i(i,f)) engine=ibmdb2i; +drop table t1; +create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i; +select * from fd; +SQSSEQ +*HEX +*HEX +*HEX +*HEX +drop table fd; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result new file mode 100644 index 00000000000..4f7d71cab2d --- /dev/null +++ b/mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result @@ -0,0 +1,1204 @@ +drop table if exists t1, ffd, fd; +CREATE TABLE t1 (armscii8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate armscii8_bin engine=ibmdb2i; +CREATE TABLE t1 (armscii8_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate armscii8_general_ci engine=ibmdb2i; +CREATE TABLE t1 (ascii_bin integer, c char(10), v varchar(20), index(c), index(v)) collate ascii_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (ascii_bin char(10) primary key) collate ascii_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ascii_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ascii_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (ascii_general_ci char(10) primary key) collate ascii_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (big5_bin integer, c char(10), v varchar(20), index(c), index(v)) collate big5_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (big5_bin char(10) primary key) collate big5_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (big5_chinese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate big5_chinese_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (big5_chinese_ci char(10) primary key) collate big5_chinese_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1250_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1250_bin char(10) primary key) collate cp1250_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1250_croatian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_croatian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1250_croatian_ci char(10) primary key) collate cp1250_croatian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1250_czech_cs integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_czech_cs engine=ibmdb2i; +CREATE TABLE t1 (cp1250_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1250_general_ci char(10) primary key) collate cp1250_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1250_polish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_polish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1250_polish_ci char(10) primary key) collate cp1250_polish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1251_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1251_bin char(10) primary key) collate cp1251_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1251_bulgarian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_bulgarian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1251_bulgarian_ci char(10) primary key) collate cp1251_bulgarian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1251_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1251_general_ci char(10) primary key) collate cp1251_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1251_general_cs integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_general_cs engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1251_general_cs char(10) primary key) collate cp1251_general_cs engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1251_ukrainian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_ukrainian_ci engine=ibmdb2i; +CREATE TABLE t1 (cp1256_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp1256_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1256_bin char(10) primary key) collate cp1256_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1256_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1256_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp1256_general_ci char(10) primary key) collate cp1256_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp1257_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp1257_bin engine=ibmdb2i; +CREATE TABLE t1 (cp1257_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1257_general_ci engine=ibmdb2i; +CREATE TABLE t1 (cp1257_lithuanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1257_lithuanian_ci engine=ibmdb2i; +CREATE TABLE t1 (cp850_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp850_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp850_bin char(10) primary key) collate cp850_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp850_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp850_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp850_general_ci char(10) primary key) collate cp850_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp852_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp852_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp852_bin char(10) primary key) collate cp852_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp852_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp852_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (cp852_general_ci char(10) primary key) collate cp852_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp866_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp866_bin engine=ibmdb2i; +CREATE TABLE t1 (cp866_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp866_general_ci engine=ibmdb2i; +CREATE TABLE t1 (cp932_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp932_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (cp932_bin char(10) primary key) collate cp932_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (cp932_japanese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp932_japanese_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (cp932_japanese_ci char(10) primary key) collate cp932_japanese_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (dec8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate dec8_bin engine=ibmdb2i; +CREATE TABLE t1 (dec8_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate dec8_swedish_ci engine=ibmdb2i; +CREATE TABLE t1 (eucjpms_bin integer, c char(10), v varchar(20), index(c), index(v)) collate eucjpms_bin engine=ibmdb2i; +CREATE TABLE t1 (eucjpms_japanese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate eucjpms_japanese_ci engine=ibmdb2i; +CREATE TABLE t1 (euckr_bin integer, c char(10), v varchar(20), index(c), index(v)) collate euckr_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (euckr_bin char(10) primary key) collate euckr_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (euckr_korean_ci integer, c char(10), v varchar(20), index(c), index(v)) collate euckr_korean_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (euckr_korean_ci char(10) primary key) collate euckr_korean_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (gb2312_bin integer, c char(10), v varchar(20), index(c), index(v)) collate gb2312_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (gb2312_bin char(10) primary key) collate gb2312_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (gb2312_chinese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate gb2312_chinese_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (gb2312_chinese_ci char(10) primary key) collate gb2312_chinese_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (gbk_bin integer, c char(10), v varchar(20), index(c), index(v)) collate gbk_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (gbk_bin char(10) primary key) collate gbk_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (gbk_chinese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate gbk_chinese_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (gbk_chinese_ci char(10) primary key) collate gbk_chinese_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (geostd8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate geostd8_bin engine=ibmdb2i; +CREATE TABLE t1 (geostd8_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate geostd8_general_ci engine=ibmdb2i; +CREATE TABLE t1 (greek_bin integer, c char(10), v varchar(20), index(c), index(v)) collate greek_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (greek_bin char(10) primary key) collate greek_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (greek_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate greek_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (greek_general_ci char(10) primary key) collate greek_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (hebrew_bin integer, c char(10), v varchar(20), index(c), index(v)) collate hebrew_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (hebrew_bin char(10) primary key) collate hebrew_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (hebrew_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate hebrew_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (hebrew_general_ci char(10) primary key) collate hebrew_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (hp8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate hp8_bin engine=ibmdb2i; +CREATE TABLE t1 (hp8_english_ci integer, c char(10), v varchar(20), index(c), index(v)) collate hp8_english_ci engine=ibmdb2i; +CREATE TABLE t1 (keybcs2_bin integer, c char(10), v varchar(20), index(c), index(v)) collate keybcs2_bin engine=ibmdb2i; +CREATE TABLE t1 (keybcs2_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate keybcs2_general_ci engine=ibmdb2i; +CREATE TABLE t1 (koi8r_bin integer, c char(10), v varchar(20), index(c), index(v)) collate koi8r_bin engine=ibmdb2i; +CREATE TABLE t1 (koi8r_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate koi8r_general_ci engine=ibmdb2i; +CREATE TABLE t1 (koi8u_bin integer, c char(10), v varchar(20), index(c), index(v)) collate koi8u_bin engine=ibmdb2i; +CREATE TABLE t1 (koi8u_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate koi8u_general_ci engine=ibmdb2i; +CREATE TABLE t1 (latin1_bin integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin1_bin char(10) primary key) collate latin1_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin1_danish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_danish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin1_danish_ci char(10) primary key) collate latin1_danish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin1_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin1_general_ci char(10) primary key) collate latin1_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin1_general_cs integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_general_cs engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin1_general_cs char(10) primary key) collate latin1_general_cs engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin1_german1_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_german1_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin1_german1_ci char(10) primary key) collate latin1_german1_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin1_german2_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_german2_ci engine=ibmdb2i; +CREATE TABLE t1 (latin1_spanish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_spanish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin1_spanish_ci char(10) primary key) collate latin1_spanish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin1_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_swedish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin1_swedish_ci char(10) primary key) collate latin1_swedish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin2_bin integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin2_bin char(10) primary key) collate latin2_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin2_croatian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_croatian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin2_croatian_ci char(10) primary key) collate latin2_croatian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin2_czech_cs integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_czech_cs engine=ibmdb2i; +CREATE TABLE t1 (latin2_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin2_general_ci char(10) primary key) collate latin2_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin2_hungarian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_hungarian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin2_hungarian_ci char(10) primary key) collate latin2_hungarian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin5_bin integer, c char(10), v varchar(20), index(c), index(v)) collate latin5_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin5_bin char(10) primary key) collate latin5_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin5_turkish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin5_turkish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (latin5_turkish_ci char(10) primary key) collate latin5_turkish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (latin7_bin integer, c char(10), v varchar(20), index(c), index(v)) collate latin7_bin engine=ibmdb2i; +CREATE TABLE t1 (latin7_estonian_cs integer, c char(10), v varchar(20), index(c), index(v)) collate latin7_estonian_cs engine=ibmdb2i; +CREATE TABLE t1 (latin7_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin7_general_ci engine=ibmdb2i; +CREATE TABLE t1 (latin7_general_cs integer, c char(10), v varchar(20), index(c), index(v)) collate latin7_general_cs engine=ibmdb2i; +CREATE TABLE t1 (macce_bin integer, c char(10), v varchar(20), index(c), index(v)) collate macce_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (macce_bin char(10) primary key) collate macce_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (macce_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate macce_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (macce_general_ci char(10) primary key) collate macce_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (macroman_bin integer, c char(10), v varchar(20), index(c), index(v)) collate macroman_bin engine=ibmdb2i; +CREATE TABLE t1 (macroman_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate macroman_general_ci engine=ibmdb2i; +CREATE TABLE t1 (sjis_bin integer, c char(10), v varchar(20), index(c), index(v)) collate sjis_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (sjis_bin char(10) primary key) collate sjis_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (sjis_japanese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate sjis_japanese_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (sjis_japanese_ci char(10) primary key) collate sjis_japanese_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (swe7_bin integer, c char(10), v varchar(20), index(c), index(v)) collate swe7_bin engine=ibmdb2i; +CREATE TABLE t1 (swe7_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate swe7_swedish_ci engine=ibmdb2i; +CREATE TABLE t1 (tis620_bin integer, c char(10), v varchar(20), index(c), index(v)) collate tis620_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (tis620_bin char(10) primary key) collate tis620_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (tis620_thai_ci integer, c char(10), v varchar(20), index(c), index(v)) collate tis620_thai_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 11 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 23 NULL 6 Using where +drop table t1; +create table t1 (tis620_thai_ci char(10) primary key) collate tis620_thai_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_bin integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_bin char(10) primary key) collate ucs2_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_czech_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_czech_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_czech_ci char(10) primary key) collate ucs2_czech_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_danish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_danish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_danish_ci char(10) primary key) collate ucs2_danish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_esperanto_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_esperanto_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_esperanto_ci char(10) primary key) collate ucs2_esperanto_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_estonian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_estonian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_estonian_ci char(10) primary key) collate ucs2_estonian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_general_ci char(10) primary key) collate ucs2_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_hungarian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_hungarian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_hungarian_ci char(10) primary key) collate ucs2_hungarian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_icelandic_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_icelandic_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_icelandic_ci char(10) primary key) collate ucs2_icelandic_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_latvian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_latvian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_latvian_ci char(10) primary key) collate ucs2_latvian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_lithuanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_lithuanian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_lithuanian_ci char(10) primary key) collate ucs2_lithuanian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_persian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_persian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_persian_ci char(10) primary key) collate ucs2_persian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_polish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_polish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_polish_ci char(10) primary key) collate ucs2_polish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_romanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_romanian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_romanian_ci char(10) primary key) collate ucs2_romanian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_roman_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_roman_ci engine=ibmdb2i; +CREATE TABLE t1 (ucs2_slovak_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_slovak_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_slovak_ci char(10) primary key) collate ucs2_slovak_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_slovenian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_slovenian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_slovenian_ci char(10) primary key) collate ucs2_slovenian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_spanish2_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_spanish2_ci engine=ibmdb2i; +CREATE TABLE t1 (ucs2_spanish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_spanish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_spanish_ci char(10) primary key) collate ucs2_spanish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_swedish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_swedish_ci char(10) primary key) collate ucs2_swedish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_turkish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_turkish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_turkish_ci char(10) primary key) collate ucs2_turkish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ucs2_unicode_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_unicode_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 21 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 43 NULL 6 Using where +drop table t1; +create table t1 (ucs2_unicode_ci char(10) primary key) collate ucs2_unicode_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ujis_bin integer, c char(10), v varchar(20), index(c), index(v)) collate ujis_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (ujis_bin char(10) primary key) collate ujis_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (ujis_japanese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ujis_japanese_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (ujis_japanese_ci char(10) primary key) collate ujis_japanese_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_bin engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_bin char(10) primary key) collate utf8_bin engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_czech_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_czech_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_czech_ci char(10) primary key) collate utf8_czech_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_danish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_danish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_danish_ci char(10) primary key) collate utf8_danish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_esperanto_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_esperanto_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_esperanto_ci char(10) primary key) collate utf8_esperanto_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_estonian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_estonian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_estonian_ci char(10) primary key) collate utf8_estonian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_general_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_general_ci char(10) primary key) collate utf8_general_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_hungarian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_hungarian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_hungarian_ci char(10) primary key) collate utf8_hungarian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_icelandic_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_icelandic_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_icelandic_ci char(10) primary key) collate utf8_icelandic_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_latvian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_latvian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_latvian_ci char(10) primary key) collate utf8_latvian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_lithuanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_lithuanian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_lithuanian_ci char(10) primary key) collate utf8_lithuanian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_persian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_persian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_persian_ci char(10) primary key) collate utf8_persian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_polish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_polish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_polish_ci char(10) primary key) collate utf8_polish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_romanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_romanian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_romanian_ci char(10) primary key) collate utf8_romanian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_roman_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_roman_ci engine=ibmdb2i; +CREATE TABLE t1 (utf8_slovak_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_slovak_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_slovak_ci char(10) primary key) collate utf8_slovak_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_slovenian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_slovenian_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_slovenian_ci char(10) primary key) collate utf8_slovenian_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_spanish2_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_spanish2_ci engine=ibmdb2i; +CREATE TABLE t1 (utf8_spanish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_spanish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_spanish_ci char(10) primary key) collate utf8_spanish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_swedish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_swedish_ci char(10) primary key) collate utf8_swedish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_turkish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_turkish_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_turkish_ci char(10) primary key) collate utf8_turkish_ci engine=ibmdb2i; +drop table t1; +CREATE TABLE t1 (utf8_unicode_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_unicode_ci engine=ibmdb2i; +insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); +insert into t1 select * from t1; +explain select c,v from t1 force index(c) where c like "ab%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 31 NULL 6 Using where +explain select c,v from t1 force index(v) where v like "de%"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 63 NULL 6 Using where +drop table t1; +create table t1 (utf8_unicode_ci char(10) primary key) collate utf8_unicode_ci engine=ibmdb2i; +drop table t1; +create table ffd (WHCHD1 CHAR(20), WHCSID decimal(5,0)) engine=ibmdb2i; +create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i; +create temporary table intermed (row integer key auto_increment, cs char(30), ccsid integer); +insert into intermed (cs, ccsid) select * from ffd; +create temporary table intermed2 (row integer key auto_increment, srtseq char(10)); +insert into intermed2 (srtseq) select * from fd; +select ccsid, cs, srtseq from intermed inner join intermed2 on intermed.row = intermed2.row; +ccsid cs srtseq +500 "ascii_bin" QBLA101F4U +500 "ascii_general_ci" QALA101F4S +1200 "big5_bin" QBCHT04B0U +1200 "big5_chinese_ci" QACHT04B0S +1153 "cp1250_bin" QELA20481U +1153 "cp1250_croatian_ci" QALA20481S +1153 "cp1250_general_ci" QCLA20481S +1153 "cp1250_polish_ci" QDLA20481S +1025 "cp1251_bin" QCCYR0401U +1025 "cp1251_bulgarian_ci QACYR0401S +1025 "cp1251_general_ci" QBCYR0401S +1025 "cp1251_general_cs" QBCYR0401U +420 "cp1256_bin" QBARA01A4U +420 "cp1256_general_ci" QAARA01A4S +500 "cp850_bin" QDLA101F4U +500 "cp850_general_ci" QCLA101F4S +870 "cp852_bin" QBLA20366U +870 "cp852_general_ci" QALA20366S +1200 "cp932_bin" QBJPN04B0U +1200 "cp932_japanese_ci" QAJPN04B0S +1200 "euckr_bin" QBKOR04B0U +1200 "euckr_korean_ci" QAKOR04B0S +1200 "gb2312_bin" QBCHS04B0U +1200 "gb2312_chinese_ci" QACHS04B0S +1200 "gbk_bin" QDCHS04B0U +1200 "gbk_chinese_ci" QCCHS04B0S +875 "greek_bin" QBELL036BU +875 "greek_general_ci" QAELL036BS +424 "hebrew_bin" QBHEB01A8U +424 "hebrew_general_ci" QAHEB01A8S +1148 "latin1_bin" QFLA1047CU +1148 "latin1_danish_ci" QALA1047CS +1148 "latin1_general_ci" QBLA1047CS +1148 "latin1_general_cs" QBLA1047CU +1148 "latin1_german1_ci" QCLA1047CS +1148 "latin1_spanish_ci" QDLA1047CS +1148 "latin1_swedish_ci" QELA1047CS +870 "latin2_bin" QGLA20366U +870 "latin2_croatian_ci" QCLA20366S +870 "latin2_general_ci" QELA20366S +870 "latin2_hungarian_ci QFLA20366S +1026 "latin5_bin" QBTRK0402U +1026 "latin5_turkish_ci" QATRK0402S +870 "macce_bin" QILA20366U +870 "macce_general_ci" QHLA20366S +1200 "sjis_bin" QDJPN04B0U +1200 "sjis_japanese_ci" QCJPN04B0S +838 "tis620_bin" QBTHA0346U +838 "tis620_thai_ci" QATHA0346S +13488 "ucs2_bin" *HEX +13488 "ucs2_czech_ci" I34ACS_CZ +13488 "ucs2_danish_ci" I34ADA_DK +13488 "ucs2_esperanto_ci" I34AEO +13488 "ucs2_estonian_ci" I34AET +13488 "ucs2_general_ci" QAUCS04B0S +13488 "ucs2_hungarian_ci" I34AHU +13488 "ucs2_icelandic_ci" I34AIS +13488 "ucs2_latvian_ci" I34ALV +13488 "ucs2_lithuanian_ci" I34ALT +13488 "ucs2_persian_ci" I34AFA +13488 "ucs2_polish_ci" I34APL +13488 "ucs2_romanian_ci" I34ARO +13488 "ucs2_slovak_ci" I34ASK +13488 "ucs2_slovenian_ci" I34ASL +13488 "ucs2_spanish_ci" I34AES +13488 "ucs2_swedish_ci" I34ASW +13488 "ucs2_turkish_ci" I34ATR +13488 "ucs2_unicode_ci" I34AEN +1200 "ujis_bin" QFJPN04B0U +1200 "ujis_japanese_ci" QEJPN04B0S +1208 "utf8_bin" *HEX +1208 "utf8_czech_ci" I34ACS_CZ +1208 "utf8_danish_ci" I34ADA_DK +1208 "utf8_esperanto_ci" I34AEO +1208 "utf8_estonian_ci" I34AET +1200 "utf8_general_ci" QAUCS04B0S +1208 "utf8_hungarian_ci" I34AHU +1208 "utf8_icelandic_ci" I34AIS +1208 "utf8_latvian_ci" I34ALV +1208 "utf8_lithuanian_ci" I34ALT +1208 "utf8_persian_ci" I34AFA +1208 "utf8_polish_ci" I34APL +1208 "utf8_romanian_ci" I34ARO +1208 "utf8_slovak_ci" I34ASK +1208 "utf8_slovenian_ci" I34ASL +1208 "utf8_spanish_ci" I34AES +1208 "utf8_swedish_ci" I34ASW +1208 "utf8_turkish_ci" I34ATR +1208 "utf8_unicode_ci" I34AEN +drop table ffd, fd; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test new file mode 100644 index 00000000000..17b1d658975 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test @@ -0,0 +1,26 @@ +source suite/ibmdb2i/include/have_ibmdb2i.inc; +source suite/ibmdb2i/include/have_i61.inc; + +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i; +insert into t1 values ("ch"),("h"),("i"); +select * from t1 order by c; +drop table t1; + +create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i; +insert into t1 values ("ch"),("h"),("i"); +select * from t1 order by c; +drop table t1; + +create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i; +insert into t1 values("abc"),("abcd"),("aaaa"); +select c from t1 order by c; +drop table t1; + +create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i; +insert into t1 values("abc"),("abcd"),("aaaa"); +select c from t1 order by c; +drop table t1; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test new file mode 100644 index 00000000000..93fb78ff421 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test @@ -0,0 +1,11 @@ +source suite/ibmdb2i/include/have_ibmdb2i.inc; +source suite/ibmdb2i/include/have_i61.inc; + +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t1 (c char(10), index(c)) charset macce engine=ibmdb2i; +insert into t1 values ("test"); +select * from t1 order by c; +drop table t1; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test new file mode 100644 index 00000000000..695d8e90ada --- /dev/null +++ b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test @@ -0,0 +1,47 @@ +source suite/ibmdb2i/include/have_ibmdb2i.inc; + +# Confirm that ibmdb2i_create_index_option causes additional *HEX sorted indexes to be created for all non-binary keys. + +set ibmdb2i_create_index_option=1; +--disable_warnings +drop schema if exists test1; +create schema test1; +use test1; +--enable_warnings + +--disable_abort_on_error +--error 0,255 +exec system "DLTF QGPL/FDOUT" > /dev/null; +--enable_abort_on_error + +#No additional index because no string fields in key +CREATE TABLE t1 (f int primary key, index(f)) engine=ibmdb2i; +--error 255 +exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; +--error 255 +exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; +drop table t1; + +#No additional index because binary sorting +CREATE TABLE t1 (f char(10) collate utf8_bin primary key, index(f)) engine=ibmdb2i; +--error 255 +exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; +--error 255 +exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; +drop table t1; + +CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, index(f)) engine=ibmdb2i; +exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; +exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; +drop table t1; + +CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, i int, index i(i,f)) engine=ibmdb2i; +exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; +exec system "DSPFD FILE(\"test1\"/\"i___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; +drop table t1; + + +create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i; +system system "CPYF FROMFILE(QGPL/FDOUT) TOFILE(\"test1\"/\"fd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null; +select * from fd; +drop table fd; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test new file mode 100644 index 00000000000..899f330d360 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test @@ -0,0 +1,44 @@ +source suite/ibmdb2i/include/have_ibmdb2i.inc; +source suite/ibmdb2i/include/have_i61.inc; +--disable_warnings +drop table if exists t1, ffd, fd; +--enable_warnings + +--disable_abort_on_error +--error 0,255 +exec system "DLTF QGPL/FFDOUT" > /dev/null; +--error 0,255 +exec system "DLTF QGPL/FDOUT" > /dev/null; +--enable_abort_on_error +let $count= query_get_value(select count(*) from information_schema.COLLATIONS where COLLATION_NAME <> "binary", count(*),1); + +while ($count) +{ + let $collation = query_get_value(select COLLATION_NAME from information_schema.COLLATIONS where COLLATION_NAME <> "binary" order by COLLATION_NAME desc, COLLATION_NAME, $count); + error 0,1005,2504,2028; + eval CREATE TABLE t1 ($collation integer, c char(10), v varchar(20), index(c), index(v)) collate $collation engine=ibmdb2i; + if (!$mysql_errno) + { + insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); + insert into t1 select * from t1; + explain select c,v from t1 force index(c) where c like "ab%"; + explain select c,v from t1 force index(v) where v like "de%"; + drop table t1; + eval create table t1 ($collation char(10) primary key) collate $collation engine=ibmdb2i; + system system "DSPFFD FILE(\"test\"/\"t1\") OUTPUT(*OUTFILE) OUTFILE(QGPL/FFDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; + system system "DSPFD FILE(\"test\"/\"t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; + drop table t1; + } + dec $count; +} + +create table ffd (WHCHD1 CHAR(20), WHCSID decimal(5,0)) engine=ibmdb2i; +system system "CPYF FROMFILE(QGPL/FFDOUT) TOFILE(\"test\"/\"ffd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null; +create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i; +system system "CPYF FROMFILE(QGPL/FDOUT) TOFILE(\"test\"/\"fd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null; +create temporary table intermed (row integer key auto_increment, cs char(30), ccsid integer); +insert into intermed (cs, ccsid) select * from ffd; +create temporary table intermed2 (row integer key auto_increment, srtseq char(10)); +insert into intermed2 (srtseq) select * from fd; +select ccsid, cs, srtseq from intermed inner join intermed2 on intermed.row = intermed2.row; +drop table ffd, fd; diff --git a/mysql-test/suite/ndb/my.cnf b/mysql-test/suite/ndb/my.cnf index 60769272ada..a19fdeee302 100644 --- a/mysql-test/suite/ndb/my.cnf +++ b/mysql-test/suite/ndb/my.cnf @@ -13,6 +13,7 @@ ndbcluster [ENV] NDB_CONNECTSTRING= @mysql_cluster.1.ndb_connectstring +MASTER_MYSOCK= @mysqld.1.1.socket MASTER_MYPORT= @mysqld.1.1.port MASTER_MYPORT1= @mysqld.2.1.port diff --git a/mysql-test/suite/ndb/r/ndb_binlog_format.result b/mysql-test/suite/ndb/r/ndb_binlog_format.result index bb02002ed58..6e1fc12130f 100644 --- a/mysql-test/suite/ndb/r/ndb_binlog_format.result +++ b/mysql-test/suite/ndb/r/ndb_binlog_format.result @@ -15,15 +15,15 @@ COMMIT; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # use `test`; BEGIN +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # use `test`; COMMIT +mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c -mysqld-bin.000001 # Query # # use `test`; BEGIN +mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f mysqld-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c -mysqld-bin.000001 # Query # # use `test`; COMMIT +mysqld-bin.000001 # Query # # COMMIT mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Table_map # # table_id: # (test.t3) mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result b/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result index eba1222ea33..f9c077f38da 100644 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result +++ b/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result @@ -28,7 +28,7 @@ from mysql.ndb_apply_status; show binlog events from <start_pos> limit 1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN +master-bin.000001 <start_pos> Query 1 # BEGIN # Now the insert, one step after @@ -53,7 +53,7 @@ from mysql.ndb_apply_status; <log_name> <start_pos> <end_pos> show binlog events from <start_pos> limit 1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN +master-bin.000001 <start_pos> Query 1 # BEGIN show binlog events from <start_pos> limit 1,2; Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/suite/parts/r/partition_auto_increment_memory.result b/mysql-test/suite/parts/r/partition_auto_increment_memory.result index 77bab79f020..f4d783825f4 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result @@ -381,12 +381,12 @@ Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`c1`) -) ENGINE=MEMORY AUTO_INCREMENT=28 DEFAULT CHARSET=latin1 +) ENGINE=MEMORY AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ SELECT * FROM t1 ORDER BY c1; c1 -27 +1 INSERT INTO t1 VALUES (100); INSERT INTO t1 VALUES (NULL); DELETE FROM t1 WHERE c1 >= 100; diff --git a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result index b5b001ec17a..6abf08b68a0 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result @@ -381,12 +381,12 @@ Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`c1`) -) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=latin1 +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ SELECT * FROM t1 ORDER BY c1; c1 -27 +1 INSERT INTO t1 VALUES (100); INSERT INTO t1 VALUES (NULL); DELETE FROM t1 WHERE c1 >= 100; diff --git a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result new file mode 100644 index 00000000000..23736804784 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result @@ -0,0 +1,109 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP DATABASE IF EXISTS db1; +CREATE DATABASE db1; +use db1; +CREATE TABLE db1.t1 (a INT) ENGINE=InnoDB; +CREATE TABLE db1.t2 (s CHAR(255)) ENGINE=MyISAM; +include/stop_slave.inc +[on master] +CREATE PROCEDURE db1.p1 () +BEGIN +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +END// +CREATE PROCEDURE db1.p2 () +BEGIN +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +INSERT INTO t1 VALUES (8); +INSERT INTO t1 VALUES (9); +INSERT INTO t1 VALUES (10); +INSERT INTO t2 VALUES ('executed db1.p2()'); +END// +INSERT INTO db1.t2 VALUES ('before call db1.p1()'); +use test; +BEGIN; +CALL db1.p1(); +COMMIT; +INSERT INTO db1.t2 VALUES ('after call db1.p1()'); +SELECT * FROM db1.t1; +a +1 +2 +3 +4 +5 +SELECT * FROM db1.t2; +s +before call db1.p1() +after call db1.p1() +[on slave] +start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS; +# +# If we got non-zero here, then we're suffering BUG#43263 +# +SELECT 0 as 'Must be 0'; +Must be 0 +0 +SELECT * from db1.t1; +a +1 +2 +3 +4 +5 +SELECT * from db1.t2; +s +before call db1.p1() +[on master] +INSERT INTO db1.t2 VALUES ('before call db1.p2()'); +BEGIN; +CALL db1.p2(); +ROLLBACK; +INSERT INTO db1.t2 VALUES ('after call db1.p2()'); +SELECT * FROM db1.t1; +a +1 +2 +3 +4 +5 +SELECT * FROM db1.t2; +s +before call db1.p1() +after call db1.p1() +before call db1.p2() +executed db1.p2() +after call db1.p2() +[on slave] +start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS; +# +# If we got non-zero here, then we're suffering BUG#43263 +# +SELECT 0 as 'Must be 0'; +Must be 0 +0 +SELECT * from db1.t1; +a +1 +2 +3 +4 +5 +SELECT * from db1.t2; +s +before call db1.p1() +executed db1.p2() +# +# Clean up +# +DROP DATABASE db1; +DROP DATABASE db1; diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index 72dc58effa1..4a789f361c6 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -23,7 +23,7 @@ master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 master-bin.000001 106 Query 1 193 drop database if exists d1 master-bin.000001 193 Query 1 272 create database d1 master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb -master-bin.000001 370 Query 1 436 use `d1`; BEGIN +master-bin.000001 370 Query 1 436 BEGIN master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) master-bin.000001 521 Xid 1 548 COMMIT /* XID */ master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y @@ -44,11 +44,11 @@ master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 master-bin.000001 106 Query 1 193 drop database if exists d1 master-bin.000001 193 Query 1 272 create database d1 master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb -master-bin.000001 370 Query 1 436 use `d1`; BEGIN +master-bin.000001 370 Query 1 436 BEGIN master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) master-bin.000001 521 Xid 1 548 COMMIT /* XID */ master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y -master-bin.000001 633 Query 1 699 use `d1`; BEGIN +master-bin.000001 633 Query 1 699 BEGIN master-bin.000001 699 Query 1 784 use `d1`; insert into t values (2) master-bin.000001 784 Xid 1 811 COMMIT /* XID */ master-bin.000001 811 Query 1 899 use `d1`; revoke select on t from x@y diff --git a/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result new file mode 100644 index 00000000000..0e3f83d0aa5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result @@ -0,0 +1,135 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; +CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam; +CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; +######################################################################################## +# 1 - SINGLE STATEMENT +######################################################################################## +*** Single statement on transactional table *** +Got one of the listed errors +*** Single statement on non-transactional table *** +*** After WL#2687 the difference between STATEMENT/MIXED and ROW will not exist. *** +Got one of the listed errors +*** Single statement on both transactional and non-transactional tables. *** +*** After WL#2687 we will be able to change the order of the tables. *** +Got one of the listed errors +SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; +START SLAVE SQL_THREAD; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; +BEGIN; +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors +BEGIN; +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors +BEGIN; +Got one of the listed errors +Got one of the listed errors +source include/diff_master_slave.inc; +######################################################################################## +# 3 - BEGIN - COMMIT +######################################################################################## +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; +BEGIN; +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors +COMMIT; +source include/diff_master_slave.inc; +######################################################################################## +# 4 - BEGIN - ROLLBACK +######################################################################################## +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; +BEGIN; +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +source include/diff_master_slave.inc; +######################################################################################## +# 5 - PROCEDURE +######################################################################################## +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; +CREATE PROCEDURE p1(pd VARCHAR(30000)) +BEGIN +INSERT INTO t1 (a, data) VALUES (1, pd); +INSERT INTO t1 (a, data) VALUES (2, pd); +INSERT INTO t1 (a, data) VALUES (3, pd); +INSERT INTO t1 (a, data) VALUES (4, pd); +INSERT INTO t1 (a, data) VALUES (5, 's'); +END// +TRUNCATE TABLE t1; +TRUNCATE TABLE t1; +BEGIN; +Got one of the listed errors +COMMIT; +TRUNCATE TABLE t1; +BEGIN; +Got one of the listed errors +ROLLBACK; +source include/diff_master_slave.inc; +######################################################################################## +# 6 - XID +######################################################################################## +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; +BEGIN; +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors +ROLLBACK TO sv; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +COMMIT; +source include/diff_master_slave.inc; +######################################################################################## +# 7 - NON-TRANS TABLE +######################################################################################## +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; +BEGIN; +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors +COMMIT; +BEGIN; +Got one of the listed errors +COMMIT; +######################################################################################## +# CLEAN +######################################################################################## +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE IF EXISTS t4; +DROP TABLE IF EXISTS t5; +DROP TABLE IF EXISTS t6; +DROP PROCEDURE p1; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE IF EXISTS t4; +DROP TABLE IF EXISTS t5; +DROP TABLE IF EXISTS t6; +DROP PROCEDURE p1; diff --git a/mysql-test/suite/rpl/r/rpl_concurrency_error.result b/mysql-test/suite/rpl/r/rpl_concurrency_error.result new file mode 100644 index 00000000000..ba617667d5a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result @@ -0,0 +1,119 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +######################################################################## +# Environment +######################################################################## +CREATE TABLE t (i INT, PRIMARY KEY(i), f CHAR(8)) engine = Innodb; +CREATE TABLE n (d DATETIME, f CHAR(32)) engine = MyIsam; +CREATE TRIGGER tr AFTER UPDATE ON t FOR EACH ROW +BEGIN +INSERT INTO n VALUES ( now(), concat( 'updated t: ', old.f, ' -> ', new.f ) ); +END | +INSERT INTO t VALUES (4,'black'), (2,'red'), (3,'yelow'), (1,'cyan'); +######################################################################## +# Testing ER_LOCK_WAIT_TIMEOUT +######################################################################## +SET AUTOCOMMIT = 1; +BEGIN; +UPDATE t SET f = 'yellow 2' WHERE i = 3; +SET AUTOCOMMIT = 1; +BEGIN; +UPDATE t SET f = 'magenta 2' WHERE f = 'red'; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t VALUES (5 + (2 * 10),"brown"); +INSERT INTO n VALUES (now(),"brown"); +COMMIT; +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 2' WHERE f = 'red' +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 2' WHERE i = 3 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (2 * 10),"brown") +master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") +master-bin.000001 # Query # # ROLLBACK +SET AUTOCOMMIT = 1; +BEGIN; +UPDATE t SET f = 'gray 2' WHERE i = 3; +SET AUTOCOMMIT = 1; +BEGIN; +UPDATE t SET f = 'dark blue 2' WHERE f = 'red'; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t VALUES (6 + (2 * 10),"brown"); +INSERT INTO n VALUES (now(),"brown"); +COMMIT; +COMMIT; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 2' WHERE f = 'red' +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 2' WHERE i = 3 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (2 * 10),"brown") +master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") +master-bin.000001 # Xid # # COMMIT /* XID */ +SET AUTOCOMMIT = 0; +UPDATE t SET f = 'yellow 1' WHERE i = 3; +SET AUTOCOMMIT = 0; +UPDATE t SET f = 'magenta 1' WHERE f = 'red'; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t VALUES (5 + (1 * 10),"brown"); +INSERT INTO n VALUES (now(),"brown"); +COMMIT; +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 1' WHERE f = 'red' +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 1' WHERE i = 3 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (1 * 10),"brown") +master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") +master-bin.000001 # Query # # ROLLBACK +SET AUTOCOMMIT = 0; +UPDATE t SET f = 'gray 1' WHERE i = 3; +SET AUTOCOMMIT = 0; +UPDATE t SET f = 'dark blue 1' WHERE f = 'red'; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t VALUES (6 + (1 * 10),"brown"); +INSERT INTO n VALUES (now(),"brown"); +COMMIT; +COMMIT; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red' +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 1' WHERE i = 3 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown") +master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") +master-bin.000001 # Xid # # COMMIT /* XID */ +source include/diff_master_slave.inc; +source include/diff_master_slave.inc; +######################################################################## +# Cleanup +######################################################################## +DROP TRIGGER tr; +DROP TABLE t; +DROP TABLE n; diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 1e795a85ce1..033f71c16b7 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -836,178 +836,178 @@ master-bin.000001 # Format_desc 1 # Server ver: # master-bin.000001 # Query 1 # CREATE DATABASE test_rpl master-bin.000001 # Query 1 # use `test_rpl`; CREATE TABLE t1 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=innodb master-bin.000001 # Query 1 # use `test_rpl`; CREATE TABLE t2 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=innodb -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t2) master-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 SELECT * FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES (1, 't1, text 1') ON DUPLICATE KEY UPDATE b = 't2, text 1' master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 WHERE a = 2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=# master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=# master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(3, 't1, text 3') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; REPLACE INTO t1 VALUES(1, 't1, text 11') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1) master-bin.000001 # Update_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; REPLACE INTO t1 SET a=3, b='t1, text 33' master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'CCC') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(2, 'DDD') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(1, 'DDD') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(2, 'CCC') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; TRUNCATE t1 -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; UPDATE t1 SET b = 't1, text 1 updated' WHERE a = 1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test' master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES (1, 'start') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES (3, 'before savepoint s1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES (5, 'before savepoint s2') master-bin.000001 # Query 1 # use `test_rpl`; SAVEPOINT s2 master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2') master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 7 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111' @@ -1016,7 +1016,7 @@ master-bin.000001 # Query 1 # use `test_rpl`; REVOKE SELECT ON *.* FROM 'user_te master-bin.000001 # Query 1 # use `test_rpl`; SET PASSWORD FOR 'user_test_rpl'@'localhost'='*0000000000000000000000000000000000000000' master-bin.000001 # Query 1 # use `test_rpl`; RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost' master-bin.000001 # Query 1 # use `test_rpl`; DROP USER 'user_test_rpl_2'@'localhost' -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(100, 'test') master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; ANALYZE TABLE t1 @@ -1030,65 +1030,65 @@ master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` BEGIN UPDATE t1 SET b = UUID() WHERE a = 202; END -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(201, 'test 201') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; UPDATE t1 SET b = 'test' WHERE a = 201 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(202, 'test 202') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1) master-bin.000001 # Update_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 202 master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; ALTER PROCEDURE p1 COMMENT 'p1' master-bin.000001 # Query 1 # use `test_rpl`; DROP PROCEDURE p1 master-bin.000001 # Query 1 # use `test_rpl`; DROP PROCEDURE p2 -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN INSERT INTO t2 SET a = NEW.a, b = NEW.b; END -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1) master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t2) master-bin.000001 # Write_rows 1 # table_id: # master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; DROP TRIGGER tr1 master-bin.000001 # Query 1 # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'localhost' -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1') master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1 master-bin.000001 # Query 1 # use `test_rpl`; ALTER EVENT e1 RENAME TO e2 master-bin.000001 # Query 1 # use `test_rpl`; DROP EVENT e2 -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(2, 'test2') master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 1 @@ -1096,10 +1096,10 @@ master-bin.000001 # Query 1 # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER master-bin.000001 # Query 1 # use `test_rpl`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 2 master-bin.000001 # Query 1 # use `test_rpl`; DROP VIEW v1 master-bin.000001 # Query 1 # use `test_rpl`; DROP VIEW v2 -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid 1 # # drop database test_rpl; diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result index 0551240eb8a..2e707fb62c1 100644 --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -19,10 +19,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Query 1 # COMMIT **** On Slave **** SHOW SLAVE STATUS; Slave_IO_State # @@ -68,9 +68,9 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -slave-bin.000001 # Query 1 # use `test`; BEGIN +slave-bin.000001 # Query 1 # BEGIN slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Query 1 # use `test`; COMMIT +slave-bin.000001 # Query 1 # COMMIT DROP TABLE IF EXISTS t1; SET @@global.binlog_format= @old_binlog_format; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result index 1504c16bd7e..7920b9a981d 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -28,10 +28,10 @@ INSERT INTO t2 VALUES (3,3), (4,4); show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT **** On Slave **** SHOW DATABASES; Database @@ -60,10 +60,10 @@ SHOW BINLOG EVENTS; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a INT) -master-bin.000001 192 Query 1 260 use `test`; BEGIN +master-bin.000001 192 Query 1 260 BEGIN master-bin.000001 260 Table_map 1 301 table_id: # (test.t1) master-bin.000001 301 Write_rows 1 340 table_id: # flags: STMT_END_F -master-bin.000001 340 Query 1 409 use `test`; COMMIT +master-bin.000001 340 Query 1 409 COMMIT DROP TABLE t1; ================ Test for BUG#17620 ================ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index 29f58632fde..5bed9106009 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -150,10 +150,10 @@ a b SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info # 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) -# 206 Query # 274 use `test`; BEGIN +# 206 Query # 274 BEGIN # 274 Table_map # 316 table_id: # (test.t7) # 316 Write_rows # 372 table_id: # flags: STMT_END_F -# 372 Query # 443 use `test`; ROLLBACK +# 372 Query # 443 ROLLBACK SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -173,10 +173,10 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -# 106 Query # 174 use `test`; BEGIN +# 106 Query # 174 BEGIN # 174 Table_map # 216 table_id: # (test.t7) # 216 Write_rows # 272 table_id: # flags: STMT_END_F -# 272 Query # 343 use `test`; ROLLBACK +# 272 Query # 343 ROLLBACK SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -299,35 +299,35 @@ a SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info # 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) -# 192 Query # 260 use `test`; BEGIN +# 192 Query # 260 BEGIN # 260 Table_map # 301 table_id: # (test.t1) # 301 Write_rows # 345 table_id: # flags: STMT_END_F -# 345 Query # 414 use `test`; COMMIT -# 414 Query # 482 use `test`; BEGIN +# 345 Query # 414 COMMIT +# 414 Query # 482 BEGIN # 482 Query # 607 use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB # 607 Table_map # 648 table_id: # (test.t2) # 648 Write_rows # 692 table_id: # flags: STMT_END_F # 692 Xid # 719 COMMIT /* XID */ -# 719 Query # 787 use `test`; BEGIN +# 719 Query # 787 BEGIN # 787 Query # 912 use `test`; CREATE TABLE `t3` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB # 912 Table_map # 953 table_id: # (test.t3) # 953 Write_rows # 997 table_id: # flags: STMT_END_F # 997 Xid # 1024 COMMIT /* XID */ -# 1024 Query # 1092 use `test`; BEGIN +# 1024 Query # 1092 BEGIN # 1092 Query # 1217 use `test`; CREATE TABLE `t4` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB # 1217 Table_map # 1258 table_id: # (test.t4) # 1258 Write_rows # 1302 table_id: # flags: STMT_END_F # 1302 Xid # 1329 COMMIT /* XID */ -# 1329 Query # 1397 use `test`; BEGIN +# 1329 Query # 1397 BEGIN # 1397 Table_map # 1438 table_id: # (test.t1) # 1438 Write_rows # 1482 table_id: # flags: STMT_END_F -# 1482 Query # 1553 use `test`; ROLLBACK +# 1482 Query # 1553 ROLLBACK SHOW TABLES; Tables_in_test t1 @@ -393,12 +393,12 @@ a SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info # 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) -# 192 Query # 260 use `test`; BEGIN +# 192 Query # 260 BEGIN # 260 Table_map # 301 table_id: # (test.t1) # 301 Write_rows # 345 table_id: # flags: STMT_END_F -# 345 Query # 414 use `test`; COMMIT +# 345 Query # 414 COMMIT # 414 Query # 514 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB -# 514 Query # 582 use `test`; BEGIN +# 514 Query # 582 BEGIN # 582 Table_map # 623 table_id: # (test.t2) # 623 Write_rows # 667 table_id: # flags: STMT_END_F # 667 Table_map # 708 table_id: # (test.t2) @@ -431,12 +431,12 @@ SELECT * FROM t2 ORDER BY a; a SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -# 106 Query # 174 use `test`; BEGIN +# 106 Query # 174 BEGIN # 174 Table_map # 215 table_id: # (test.t2) # 215 Write_rows # 259 table_id: # flags: STMT_END_F # 259 Table_map # 300 table_id: # (test.t2) # 300 Write_rows # 339 table_id: # flags: STMT_END_F -# 339 Query # 410 use `test`; ROLLBACK +# 339 Query # 410 ROLLBACK SELECT * FROM t2 ORDER BY a; a DROP TABLE t1,t2; @@ -468,12 +468,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # DROP DATABASE IF EXISTS mysqltest1 master-bin.000001 # Query # # CREATE DATABASE mysqltest1 master-bin.000001 # Query # # use `test`; CREATE TABLE mysqltest1.without_select (f1 BIGINT) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; CREATE TABLE `mysqltest1`.`with_select` ( `f1` int(1) NOT NULL DEFAULT '0' ) master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT DROP DATABASE mysqltest1; end of the tests diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index b76cc6aa15e..9593b009d1f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -20,23 +20,23 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Query 1 # COMMIT master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Query 1 # COMMIT show binlog events from 106 limit 1; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM show binlog events from 106 limit 2; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN show binlog events from 106 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Table_map 1 # table_id: # (test.t1) @@ -192,26 +192,26 @@ insert into t2 values (1); show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT master-bin.000001 # Rotate # # master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM -master-bin.000002 # Query 1 # use `test`; BEGIN +master-bin.000002 # Query 1 # BEGIN master-bin.000002 # Table_map 1 # table_id: # (test.t2) master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000002 # Query 1 # use `test`; COMMIT +master-bin.000002 # Query 1 # COMMIT show binary logs; Log_name File_size master-bin.000001 # @@ -224,26 +224,26 @@ show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -slave-bin.000001 # Query 1 # use `test`; BEGIN +slave-bin.000001 # Query 1 # BEGIN slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Query 1 # use `test`; COMMIT +slave-bin.000001 # Query 1 # COMMIT slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -slave-bin.000001 # Query 1 # use `test`; BEGIN +slave-bin.000001 # Query 1 # BEGIN slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Query 1 # use `test`; COMMIT +slave-bin.000001 # Query 1 # COMMIT slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM -slave-bin.000002 # Query 1 # use `test`; BEGIN +slave-bin.000002 # Query 1 # BEGIN slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000002 # Query 1 # use `test`; COMMIT +slave-bin.000002 # Query 1 # COMMIT SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -301,14 +301,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT select * from t1; a b 1 1 diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result index 809c50e1465..8526bad558b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -20,13 +20,13 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # COMMIT /* XID */ master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # COMMIT /* XID */ @@ -36,7 +36,7 @@ master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_in show binlog events from 106 limit 2; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # BEGIN show binlog events from 106 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Table_map 1 # table_id: # (test.t1) @@ -192,13 +192,13 @@ insert into t2 values (1); show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -208,7 +208,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB -master-bin.000002 # Query 1 # use `test`; BEGIN +master-bin.000002 # Query 1 # BEGIN master-bin.000002 # Table_map 1 # table_id: # (test.t2) master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000002 # Xid 1 # COMMIT /* XID */ @@ -301,14 +301,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT select * from t1; a b 1 1 diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result index 6126ec4bacc..fa40d8760a8 100644 --- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -174,3 +174,26 @@ start slave; show status like 'slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 +stop slave; +reset slave; +*** errno must be zero: 0 *** +change master to master_user='impossible_user_name'; +start slave; +ONE +1 +include/stop_slave.inc +change master to master_user='root'; +include/start_slave.inc +*** last errno must be zero: 0 *** +*** last error must be blank: *** +include/stop_slave.inc +change master to master_user='impossible_user_name'; +start slave; +ONE +1 +include/stop_slave.inc +reset slave; +*** io last errno must be zero: 0 *** +*** io last error must be blank: *** +*** sql last errno must be zero: 0 *** +*** sql last error must be blank: *** diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index 93b3e124a01..6148de5d954 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -17,20 +17,20 @@ show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Update_rows # # table_id: # master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT SELECT * FROM t1; a b 1 1 diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result index bb89d150af7..78d9d7c41eb 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -174,3 +174,26 @@ start slave; show status like 'slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 1 +stop slave; +reset slave; +*** errno must be zero: 0 *** +change master to master_user='impossible_user_name'; +start slave; +ONE +1 +include/stop_slave.inc +change master to master_user='root'; +include/start_slave.inc +*** last errno must be zero: 0 *** +*** last error must be blank: *** +include/stop_slave.inc +change master to master_user='impossible_user_name'; +start slave; +ONE +1 +include/stop_slave.inc +reset slave; +*** io last errno must be zero: 0 *** +*** io last error must be blank: *** +*** sql last errno must be zero: 0 *** +*** sql last error must be blank: *** diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index fcc3d56a9f5..af8eef764ed 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,4 +11,5 @@ ############################################################################## rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx -rpl_init_slave : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows +rpl_init_slave : Bug#44920 2009-07006 pcrews MTR2 is not processing master.opt input properly on Windows. *Must be done this way due to the nature of the bug* + diff --git a/mysql-test/suite/rpl/t/rpl_begin_commit_rollback-slave.opt b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback-slave.opt new file mode 100644 index 00000000000..b4abda5893f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback-slave.opt @@ -0,0 +1 @@ +--innodb --replicate-do-db=db1 diff --git a/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test new file mode 100644 index 00000000000..ec56e6a4f38 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test @@ -0,0 +1,125 @@ +source include/master-slave.inc; +source include/have_innodb.inc; +source include/have_binlog_format_statement.inc; + +disable_warnings; +DROP DATABASE IF EXISTS db1; +enable_warnings; + +CREATE DATABASE db1; + +use db1; + +CREATE TABLE db1.t1 (a INT) ENGINE=InnoDB; +CREATE TABLE db1.t2 (s CHAR(255)) ENGINE=MyISAM; + +sync_slave_with_master; +source include/stop_slave.inc; +connection master; +echo [on master]; + +DELIMITER //; +CREATE PROCEDURE db1.p1 () +BEGIN + INSERT INTO t1 VALUES (1); + INSERT INTO t1 VALUES (2); + INSERT INTO t1 VALUES (3); + INSERT INTO t1 VALUES (4); + INSERT INTO t1 VALUES (5); +END// + +CREATE PROCEDURE db1.p2 () +BEGIN + INSERT INTO t1 VALUES (6); + INSERT INTO t1 VALUES (7); + INSERT INTO t1 VALUES (8); + INSERT INTO t1 VALUES (9); + INSERT INTO t1 VALUES (10); + INSERT INTO t2 VALUES ('executed db1.p2()'); +END// +DELIMITER ;// + +INSERT INTO db1.t2 VALUES ('before call db1.p1()'); + +# Note: the master_log_pos is set to be the position of the BEGIN + 1, +# so before fix of BUG#43263 if the BEGIN is ignored, then all the +# INSERTS in p1 will be replicated in AUTOCOMMIT=1 mode and the slave +# SQL thread will stop right before the first INSERT. After fix of +# BUG#43263, BEGIN will not be ignored by the replication db rules, +# and then the whole transaction will be executed before slave SQL +# stop. +let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1); +let $master_pos= `SELECT $master_pos + 1`; + +use test; +BEGIN; +CALL db1.p1(); +COMMIT; + +# The position where the following START SLAVE UNTIL will stop at +let $master_end_trans_pos= query_get_value(SHOW MASTER STATUS, Position, 1); + +INSERT INTO db1.t2 VALUES ('after call db1.p1()'); +SELECT * FROM db1.t1; +SELECT * FROM db1.t2; + +connection slave; +echo [on slave]; + +replace_result $master_pos MASTER_POS; +eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_pos; +source include/wait_for_slave_sql_to_stop.inc; +let $slave_sql_stop_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); +let $result= query_get_value(SELECT $slave_sql_stop_pos - $master_end_trans_pos as result, result, 1); + +--echo # +--echo # If we got non-zero here, then we're suffering BUG#43263 +--echo # +eval SELECT $result as 'Must be 0'; +SELECT * from db1.t1; +SELECT * from db1.t2; + +connection master; +echo [on master]; + +INSERT INTO db1.t2 VALUES ('before call db1.p2()'); + +# See comments above. +let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1); +let $master_pos= `SELECT $master_pos + 1`; + +BEGIN; +CALL db1.p2(); +disable_warnings; +ROLLBACK; +enable_warnings; +let $master_end_trans_pos= query_get_value(SHOW MASTER STATUS, Position, 1); + +INSERT INTO db1.t2 VALUES ('after call db1.p2()'); +SELECT * FROM db1.t1; +SELECT * FROM db1.t2; + +connection slave; +echo [on slave]; + +replace_result $master_pos MASTER_POS; +eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_pos; +source include/wait_for_slave_sql_to_stop.inc; + +let $slave_sql_stop_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); +let $result= query_get_value(SELECT $slave_sql_stop_pos - $master_end_trans_pos as result, result, 1); + +--echo # +--echo # If we got non-zero here, then we're suffering BUG#43263 +--echo # +eval SELECT $result as 'Must be 0'; +SELECT * from db1.t1; +SELECT * from db1.t2; + +--echo # +--echo # Clean up +--echo # +connection master; +DROP DATABASE db1; +connection slave; +DROP DATABASE db1; diff --git a/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size-master.opt b/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size-master.opt new file mode 100644 index 00000000000..45631525481 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size-master.opt @@ -0,0 +1 @@ +--binlog_cache_size=4096 --max_binlog_cache_size=7680 diff --git a/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test new file mode 100644 index 00000000000..e1f1f8c54bb --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test @@ -0,0 +1,395 @@ +######################################################################################## +# This test verifies if the binlog is not corrupted when the cache buffer is not +# big enough to accommodate the changes and is divided in five steps: +# +# 1 - Single Statements: +# 1.1 - Single statement on transactional table. +# 1.2 - Single statement on non-transactional table. +# 1.3 - Single statement on both transactional and non-transactional tables. +# In both 1.2 and 1.3, an incident event is logged to notify the user that the +# master and slave are diverging. +# +# 2 - Transactions ended by an implicit commit. +# +# 3 - Transactions ended by a COMMIT. +# +# 4 - Transactions ended by a ROLLBACK. +# +# 5 - Transactions with a failing statement that updates a non-transactional +# table. In this case, a failure means that the statement does not get into +# the cache and an incident event is logged to notify the user that the master +# and slave are diverging. +# +######################################################################################## + +######################################################################################## +# Configuring the environment +######################################################################################## +--source include/have_innodb.inc +--source include/master-slave.inc +--source include/not_embedded.inc +--source include/not_windows.inc + +CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; +CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam; +CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; + +let $data = `select concat('"', repeat('a',2000), '"')`; + +--echo ######################################################################################## +--echo # 1 - SINGLE STATEMENT +--echo ######################################################################################## + +connection master; + +--echo *** Single statement on transactional table *** +--disable_query_log +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +eval INSERT INTO t1 (a, data) VALUES (1, + CONCAT($data, $data, $data, $data, $data)); +--enable_query_log + +--echo *** Single statement on non-transactional table *** +--echo *** After WL#2687 the difference between STATEMENT/MIXED and ROW will not exist. *** +--disable_query_log +--disable_warnings +if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) +{ + eval INSERT INTO t2 (a, data) VALUES (2, + CONCAT($data, $data, $data, $data, $data, $data)); + --echo Got one of the listed errors +} +if (`SELECT @@binlog_format = 'ROW'`) +{ + --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE + eval INSERT INTO t2 (a, data) VALUES (2, + CONCAT($data, $data, $data, $data, $data, $data)); + + connection slave; + --source include/wait_for_slave_sql_to_stop.inc + SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; + START SLAVE SQL_THREAD; + --source include/wait_for_slave_sql_to_start.inc +} +--enable_warnings +--enable_query_log + +connection master; + +--disable_query_log +eval INSERT INTO t1 (a, data) VALUES (3, $data); +eval INSERT INTO t1 (a, data) VALUES (4, $data); +eval INSERT INTO t1 (a, data) VALUES (5, $data); +eval INSERT INTO t2 (a, data) VALUES (3, $data); +eval INSERT INTO t2 (a, data) VALUES (4, $data); +eval INSERT INTO t2 (a, data) VALUES (5, $data); +--enable_query_log + +--echo *** Single statement on both transactional and non-transactional tables. *** +--echo *** After WL#2687 we will be able to change the order of the tables. *** +--disable_query_log +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data), + t1.data = CONCAT($data, $data, $data, $data); +--enable_query_log + +connection slave; +--source include/wait_for_slave_sql_to_stop.inc +SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; +START SLAVE SQL_THREAD; +--source include/wait_for_slave_sql_to_start.inc + +#--echo ######################################################################################## +#--echo # 2 - BEGIN - IMPLICIT COMMIT by DDL +#--echo ######################################################################################## + +connection master; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; + +BEGIN; +--disable_query_log +--eval INSERT INTO t1 (a, data) VALUES (1, $data); +--eval INSERT INTO t1 (a, data) VALUES (2, $data); +--eval INSERT INTO t1 (a, data) VALUES (3, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (4, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (5, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (6, $data); +--eval INSERT INTO t1 (a, data) VALUES (7, 's'); +--eval INSERT INTO t2 (a, data) VALUES (8, 's'); +--eval INSERT INTO t1 (a, data) VALUES (9, 's'); +--enable_query_log + +--disable_query_log +ALTER TABLE t3 ADD COLUMN d int; +--enable_query_log + +--disable_query_log +--eval INSERT INTO t2 (a, data) VALUES (10, $data); +--eval INSERT INTO t2 (a, data) VALUES (11, $data); +--eval INSERT INTO t2 (a, data) VALUES (12, $data); +--eval INSERT INTO t2 (a, data) VALUES (13, $data); +--enable_query_log + +BEGIN; +--disable_query_log +--eval INSERT INTO t1 (a, data) VALUES (14, $data); +--eval INSERT INTO t1 (a, data) VALUES (15, $data); +--eval INSERT INTO t1 (a, data) VALUES (16, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (17, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (18, $data); +--eval INSERT INTO t1 (a, data) VALUES (19, 's'); +--eval INSERT INTO t2 (a, data) VALUES (20, 's'); +--eval INSERT INTO t1 (a, data) VALUES (21, 's'); +--enable_query_log + +if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) +{ + --disable_query_log + CREATE TABLE t4 SELECT * FROM t1; + --enable_query_log + --echo Got one of the listed errors +} +if (`SELECT @@binlog_format = 'ROW'`) +{ + --disable_query_log + --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE + CREATE TABLE t4 SELECT * FROM t1; + --enable_query_log +} + +--disable_query_log +--eval INSERT INTO t2 (a, data) VALUES (15, $data); +--enable_query_log + +BEGIN; +--disable_query_log +--eval INSERT INTO t1 (a, data) VALUES (22, $data); +--eval INSERT INTO t1 (a, data) VALUES (23, $data); +--eval INSERT INTO t1 (a, data) VALUES (24, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (25, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (26, $data); +--eval INSERT INTO t1 (a, data) VALUES (27, 's'); +--eval INSERT INTO t2 (a, data) VALUES (28, 's'); +--eval INSERT INTO t1 (a, data) VALUES (29, 's'); +--enable_query_log + +--disable_query_log +CREATE TABLE t5 (a int); +--enable_query_log + +let $diff_statement= SELECT * FROM t1; +--source include/diff_master_slave.inc + +--echo ######################################################################################## +--echo # 3 - BEGIN - COMMIT +--echo ######################################################################################## + +connection master; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; + +BEGIN; +--disable_query_log +--eval INSERT INTO t1 (a, data) VALUES (1, $data); +--eval INSERT INTO t1 (a, data) VALUES (2, $data); +--eval INSERT INTO t1 (a, data) VALUES (3, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (4, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (5, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (6, $data); +--eval INSERT INTO t1 (a, data) VALUES (7, 's'); +--eval INSERT INTO t2 (a, data) VALUES (8, 's'); +--eval INSERT INTO t1 (a, data) VALUES (9, 's'); +--enable_query_log +COMMIT; + +let $diff_statement= SELECT * FROM t1; +--source include/diff_master_slave.inc + +--echo ######################################################################################## +--echo # 4 - BEGIN - ROLLBACK +--echo ######################################################################################## + +connection master; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; + +BEGIN; +--disable_query_log +--eval INSERT INTO t1 (a, data) VALUES (1, $data); +--eval INSERT INTO t1 (a, data) VALUES (2, $data); +--eval INSERT INTO t1 (a, data) VALUES (3, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (4, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (5, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (6, $data); +--eval INSERT INTO t1 (a, data) VALUES (7, 's'); +--eval INSERT INTO t2 (a, data) VALUES (8, 's'); +--eval INSERT INTO t1 (a, data) VALUES (9, 's'); +--enable_query_log +ROLLBACK; + +let $diff_statement= SELECT * FROM t1; +--source include/diff_master_slave.inc + +--echo ######################################################################################## +--echo # 5 - PROCEDURE +--echo ######################################################################################## + +connection master; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; + +DELIMITER //; + +CREATE PROCEDURE p1(pd VARCHAR(30000)) +BEGIN + INSERT INTO t1 (a, data) VALUES (1, pd); + INSERT INTO t1 (a, data) VALUES (2, pd); + INSERT INTO t1 (a, data) VALUES (3, pd); + INSERT INTO t1 (a, data) VALUES (4, pd); + INSERT INTO t1 (a, data) VALUES (5, 's'); +END// + +DELIMITER ;// + +TRUNCATE TABLE t1; + +--disable_query_log +eval CALL p1($data); +--enable_query_log + +TRUNCATE TABLE t1; + +BEGIN; +--disable_query_log +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +eval CALL p1($data); +--enable_query_log +COMMIT; + +TRUNCATE TABLE t1; + +BEGIN; +--disable_query_log +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +eval CALL p1($data); +--enable_query_log +ROLLBACK; + +let $diff_statement= SELECT * FROM t1; +--source include/diff_master_slave.inc + +--echo ######################################################################################## +--echo # 6 - XID +--echo ######################################################################################## + +connection master; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; + +BEGIN; +--disable_query_log +--eval INSERT INTO t1 (a, data) VALUES (1, $data); +--eval INSERT INTO t1 (a, data) VALUES (2, $data); +--eval INSERT INTO t1 (a, data) VALUES (3, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (4, $data); +SAVEPOINT sv; +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (5, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (6, $data); +--eval INSERT INTO t1 (a, data) VALUES (7, 's'); +--eval INSERT INTO t2 (a, data) VALUES (8, 's'); +--eval INSERT INTO t1 (a, data) VALUES (9, 's'); +--enable_query_log +ROLLBACK TO sv; +COMMIT; + +let $diff_statement= SELECT * FROM t1; +--source include/diff_master_slave.inc + +--echo ######################################################################################## +--echo # 7 - NON-TRANS TABLE +--echo ######################################################################################## + +connection master; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +TRUNCATE TABLE t3; + +BEGIN; +--disable_query_log +--eval INSERT INTO t1 (a, data) VALUES (1, $data); +--eval INSERT INTO t1 (a, data) VALUES (2, $data); +--eval INSERT INTO t2 (a, data) VALUES (3, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (4, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (5, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (6, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (7, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval UPDATE t2 SET data= CONCAT($data, $data); +--eval INSERT INTO t1 (a, data) VALUES (8, 's'); +--eval INSERT INTO t1 (a, data) VALUES (9, 's'); +--eval INSERT INTO t2 (a, data) VALUES (10, 's'); +--eval INSERT INTO t1 (a, data) VALUES (11, 's'); +--enable_query_log +COMMIT; + +BEGIN; +--disable_query_log +--eval INSERT INTO t1 (a, data) VALUES (15, $data); +--eval INSERT INTO t1 (a, data) VALUES (16, $data); +--eval INSERT INTO t2 (a, data) VALUES (17, $data); +--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE +--eval INSERT INTO t1 (a, data) VALUES (18, $data); +--enable_query_log +COMMIT; + +connection slave; +--source include/wait_for_slave_sql_to_stop.inc + +--echo ######################################################################################## +--echo # CLEAN +--echo ######################################################################################## + +--disable_warnings +connection master; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE IF EXISTS t4; +DROP TABLE IF EXISTS t5; +DROP TABLE IF EXISTS t6; +DROP PROCEDURE p1; +connection slave; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE IF EXISTS t4; +DROP TABLE IF EXISTS t5; +DROP TABLE IF EXISTS t6; +DROP PROCEDURE p1; +--enable_warnings diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error-master.opt b/mysql-test/suite/rpl/t/rpl_concurrency_error-master.opt new file mode 100644 index 00000000000..a6ef074a120 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error-master.opt @@ -0,0 +1 @@ +--innodb-lock-wait-timeout=1 diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test new file mode 100644 index 00000000000..da2951afb1a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test @@ -0,0 +1,149 @@ +############################################################################### +#BUG#44581 Slave stops when transaction with non-transactional table gets +#lock wait timeout +# +# In STMT and MIXED modes, a statement that changes both non-transactional and +# transactional tables must be written to the binary log whenever there are +# changes to non-transactional tables. This means that the statement gets into +# the # binary log even when the changes to the transactional tables fail. In +# particular, in the presence of a failure such statement is annotated with the +# error number and wrapped in a begin/rollback. On the slave, while applying +# the statement, it is expected the same failure and the rollback prevents the +# transactional changes to be persisted. + +# This test aims to verify if a statement that updates both transactional and +# non-transacitonal tables and fails due to concurrency problems is correctly +# processed by the slave in the sense that the statements get into the binary +# log, the error is ignored and only the non-transactional tables are changed. +############################################################################### + +--source include/master-slave.inc +--source include/have_innodb.inc +--source include/have_binlog_format_statement.inc + +--echo ######################################################################## +--echo # Environment +--echo ######################################################################## +connection master; + +CREATE TABLE t (i INT, PRIMARY KEY(i), f CHAR(8)) engine = Innodb; +CREATE TABLE n (d DATETIME, f CHAR(32)) engine = MyIsam; + +DELIMITER |; +CREATE TRIGGER tr AFTER UPDATE ON t FOR EACH ROW +BEGIN + INSERT INTO n VALUES ( now(), concat( 'updated t: ', old.f, ' -> ', new.f ) ); +END | +DELIMITER ;| + +INSERT INTO t VALUES (4,'black'), (2,'red'), (3,'yelow'), (1,'cyan'); + +connect (conn1, 127.0.0.1,root,,); +connect (conn2, 127.0.0.1,root,,); + +--echo ######################################################################## +--echo # Testing ER_LOCK_WAIT_TIMEOUT +--echo ######################################################################## + +let $type=2; + +while ($type) +{ + let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); + connection conn1; + if (`select $type = 2`) + { + SET AUTOCOMMIT = 1; + BEGIN; + } + if (`select $type = 1`) + { + SET AUTOCOMMIT = 0; + } + eval UPDATE t SET f = 'yellow $type' WHERE i = 3; + + connection conn2; + if (`select $type = 2`) + { + SET AUTOCOMMIT = 1; + BEGIN; + } + if (`select $type = 1`) + { + SET AUTOCOMMIT = 0; + } + --error ER_LOCK_WAIT_TIMEOUT + eval UPDATE t SET f = 'magenta $type' WHERE f = 'red'; + eval INSERT INTO t VALUES (5 + ($type * 10),"brown"); + INSERT INTO n VALUES (now(),"brown"); + + connection conn1; + COMMIT; + + connection conn2; + ROLLBACK; + --source include/show_binlog_events.inc + + let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); + connection conn1; + if (`select $type = 2`) + { + SET AUTOCOMMIT = 1; + BEGIN; + } + if (`select $type = 1`) + { + SET AUTOCOMMIT = 0; + } + eval UPDATE t SET f = 'gray $type' WHERE i = 3; + + connection conn2; + if (`select $type = 2`) + { + SET AUTOCOMMIT = 1; + BEGIN; + } + if (`select $type = 1`) + { + SET AUTOCOMMIT = 0; + } + --error ER_LOCK_WAIT_TIMEOUT + eval UPDATE t SET f = 'dark blue $type' WHERE f = 'red'; + eval INSERT INTO t VALUES (6 + ($type * 10),"brown"); + INSERT INTO n VALUES (now(),"brown"); + + connection conn1; + COMMIT; + + connection conn2; + COMMIT; + --source include/show_binlog_events.inc + + dec $type; +} + +connection master; +sync_slave_with_master; + +connection master; +let $diff_statement= SELECT * FROM t order by i; +source include/diff_master_slave.inc; + +connection master; +let $diff_statement= SELECT * FROM n order by d, f; +source include/diff_master_slave.inc; + +--echo ######################################################################## +--echo # Cleanup +--echo ######################################################################## + +connection master; +DROP TRIGGER tr; +DROP TABLE t; +DROP TABLE n; + +sync_slave_with_master; + +connection master; +disconnect conn1; +disconnect conn2; diff --git a/mysql-test/suite/rpl/t/rpl_sp.test b/mysql-test/suite/rpl/t/rpl_sp.test index ec6464fb095..9be630e9ae8 100644 --- a/mysql-test/suite/rpl/t/rpl_sp.test +++ b/mysql-test/suite/rpl/t/rpl_sp.test @@ -642,3 +642,6 @@ drop procedure ` mysqltestbug36570_p2`; drop function mysqltestbug36570_f1; --echo End of 5.0 tests --echo End of 5.1 tests + +# Cleanup +sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result index 5b6ca5f5097..540c430e757 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result @@ -317,14 +317,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # COMMIT select * from t1; a b 1 1 diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result index db9920dd79f..675a69d17a4 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result @@ -28,7 +28,7 @@ from mysql.ndb_apply_status; show binlog events from <start_pos> limit 1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN +master-bin.000001 <start_pos> Query 1 # BEGIN # Now the insert, one step after @@ -53,7 +53,7 @@ from mysql.ndb_apply_status; <log_name> <start_pos> <end_pos> show binlog events from <start_pos> limit 1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN +master-bin.000001 <start_pos> Query 1 # BEGIN show binlog events from <start_pos> limit 1,2; Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def index 6908269d014..2f15112515e 100644 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -11,3 +11,4 @@ ############################################################################## # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open +rpl_ndb_2ndb : Bug#45974: rpl_ndb_2ndb fails sporadically diff --git a/mysql-test/t/bug46080-master.opt b/mysql-test/t/bug46080-master.opt new file mode 100644 index 00000000000..f59740afe60 --- /dev/null +++ b/mysql-test/t/bug46080-master.opt @@ -0,0 +1 @@ +--skip-grant-tables --skip-name-resolve --safemalloc-mem-limit=4000000 diff --git a/mysql-test/t/bug46080.test b/mysql-test/t/bug46080.test new file mode 100644 index 00000000000..7e56e3ce421 --- /dev/null +++ b/mysql-test/t/bug46080.test @@ -0,0 +1,22 @@ +--echo # +--echo # Bug #46080: group_concat(... order by) crashes server when +--echo # sort_buffer_size cannot allocate +--echo # + +CREATE TABLE t1(a CHAR(255)); +INSERT INTO t1 VALUES ('a'); + +SET @@SESSION.sort_buffer_size=5*16*1000000; +SET @@SESSION.max_heap_table_size=5*1000000; + +--echo # Must not crash. +--disable_result_log +--error 0,5 +SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a; +--enable_result_log + +DROP TABLE t1; +SET @@SESSION.sort_buffer_size=default; +SET @@SESSION.max_heap_table_size=default; + +--echo End of 5.0 tests diff --git a/mysql-test/t/count_distinct3.test b/mysql-test/t/count_distinct3.test index 2f7cf7e5260..ad2bbee95a3 100644 --- a/mysql-test/t/count_distinct3.test +++ b/mysql-test/t/count_distinct3.test @@ -3,6 +3,8 @@ # mysql-4.1 # +--source include/big_test.inc + --disable_warnings DROP TABLE IF EXISTS t1, t2; --enable_warnings diff --git a/mysql-test/t/ctype_cp932_binlog_stm.test b/mysql-test/t/ctype_cp932_binlog_stm.test index 9e9716e5ddb..89df33a6df5 100644 --- a/mysql-test/t/ctype_cp932_binlog_stm.test +++ b/mysql-test/t/ctype_cp932_binlog_stm.test @@ -22,7 +22,7 @@ CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)| SELECT HEX(s1),HEX(s2),d FROM t4| DROP PROCEDURE bug18293| DROP TABLE t4| -SHOW BINLOG EVENTS FROM 369| +SHOW BINLOG EVENTS FROM 370| delimiter ;| --echo End of 5.0 tests @@ -31,8 +31,9 @@ delimiter ;| # #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump # Note: 364 is a magic position (found experimentally, depends on # the log's contents) that caused the server crash. + --error 1220 -SHOW BINLOG EVENTS FROM 364; +SHOW BINLOG EVENTS FROM 365; --echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. CREATE TABLE t1 (a varchar(16)) character set cp932; diff --git a/mysql-test/t/ctype_gbk_binlog.test b/mysql-test/t/ctype_gbk_binlog.test new file mode 100644 index 00000000000..a8f653d1b1e --- /dev/null +++ b/mysql-test/t/ctype_gbk_binlog.test @@ -0,0 +1,36 @@ +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/have_gbk.inc + +SET NAMES gbk; +--character_set gbk + +CREATE TABLE t1 ( + f1 BLOB +) ENGINE=MyISAM DEFAULT CHARSET=gbk; + +delimiter |; +CREATE PROCEDURE p1(IN val BLOB) +BEGIN + SET @tval = val; + SET @sql_cmd = CONCAT_WS(' ', 'insert into t1(f1) values(?)'); + PREPARE stmt FROM @sql_cmd; + EXECUTE stmt USING @tval; + DEALLOCATE PREPARE stmt; +END| +delimiter ;| + +SET @`tcontent`:=_binary 0x50434B000900000000000000E9000000 COLLATE `binary`/*!*/; +CALL p1(@`tcontent`); + +FLUSH LOGS; +DROP PROCEDURE p1; +RENAME TABLE t1 to t2; + +let $MYSQLD_DATADIR= `select @@datadir`; +--exec $MYSQL_BINLOG --force-if-open --short-form $MYSQLD_DATADIR/master-bin.000001 | $MYSQL +SELECT hex(f1) FROM t2; +SELECT hex(f1) FROM t1; + +DROP PROCEDURE p1; +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/t/ctype_ldml.test b/mysql-test/t/ctype_ldml.test index 73a23a751e8..db9461bfbf7 100644 --- a/mysql-test/t/ctype_ldml.test +++ b/mysql-test/t/ctype_ldml.test @@ -37,6 +37,15 @@ UPDATE t1 SET col2=col1; SELECT * FROM t1 WHERE col1=col2 ORDER BY col1; DROP TABLE t1; +--echo # +--echo # Bug#43827 Server closes connections and restarts +--echo # +# Crash happened with a user-defined utf8 collation, +# on attempt to insert a string longer than the column can store. +CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci); +INSERT INTO t1 SELECT REPEAT('a',11); +DROP TABLE t1; + # # Vietnamese experimental collation # diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index bf5cd4aa8d8..d28c19bbd18 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -279,4 +279,26 @@ disconnect con1; connection default; drop user mysqltest_1; -# End of 4.1 tests +--echo # End of 4.1 tests + +# +# Bug #41156: List of derived tables acts like a chain of +# mutually-nested subqueries +# + +SELECT 0 FROM +(SELECT 0) t01, (SELECT 0) t02, (SELECT 0) t03, (SELECT 0) t04, (SELECT 0) t05, +(SELECT 0) t06, (SELECT 0) t07, (SELECT 0) t08, (SELECT 0) t09, (SELECT 0) t10, +(SELECT 0) t11, (SELECT 0) t12, (SELECT 0) t13, (SELECT 0) t14, (SELECT 0) t15, +(SELECT 0) t16, (SELECT 0) t17, (SELECT 0) t18, (SELECT 0) t19, (SELECT 0) t20, +(SELECT 0) t21, (SELECT 0) t22, (SELECT 0) t23, (SELECT 0) t24, (SELECT 0) t25, +(SELECT 0) t26, (SELECT 0) t27, (SELECT 0) t28, (SELECT 0) t29, (SELECT 0) t30, +(SELECT 0) t31, (SELECT 0) t32, (SELECT 0) t33, (SELECT 0) t34, (SELECT 0) t35, +(SELECT 0) t36, (SELECT 0) t37, (SELECT 0) t38, (SELECT 0) t39, (SELECT 0) t40, +(SELECT 0) t41, (SELECT 0) t42, (SELECT 0) t43, (SELECT 0) t44, (SELECT 0) t45, +(SELECT 0) t46, (SELECT 0) t47, (SELECT 0) t48, (SELECT 0) t49, (SELECT 0) t50, +(SELECT 0) t51, (SELECT 0) t52, (SELECT 0) t53, (SELECT 0) t54, (SELECT 0) t55, +(SELECT 0) t56, (SELECT 0) t57, (SELECT 0) t58, (SELECT 0) t59, (SELECT 0) t60, +(SELECT 0) t61; # 61 == MAX_TABLES + +--echo # End of 5.0 tests diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index af4eb44b464..5436b7166f4 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,4 +12,5 @@ kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild. innodb_bug39438 : Bug#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently" query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically -init_connect : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows +init_connect : Bug#44920 2009-07-06 pcrews MTR not processing master.opt input properly on Windows. *Must be done this way due to the nature of the bug* + diff --git a/mysql-test/t/func_crypt.test b/mysql-test/t/func_crypt.test index cc3cdb9564d..6dedeaa0fef 100644 --- a/mysql-test/t/func_crypt.test +++ b/mysql-test/t/func_crypt.test @@ -56,3 +56,15 @@ explain extended select password('idkfa '), old_password('idkfa'); select encrypt('1234','_.'); # End of 4.1 tests + +--echo # +--echo # Bug #44767: invalid memory reads in password() and old_password() +--echo # functions +--echo # + +CREATE TABLE t1(c1 MEDIUMBLOB); +INSERT INTO t1 VALUES (REPEAT('a', 1024)); +SELECT OLD_PASSWORD(c1), PASSWORD(c1) FROM t1; +DROP TABLE t1; + +--echo End of 5.0 tests diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index f9369943d6c..91fdce8addb 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -269,6 +269,15 @@ SELECT a, ROUND(a) FROM t1; DROP TABLE t1; +# +# Bug#45152 crash with round() function on longtext column in a derived table +# +CREATE TABLE t1(f1 LONGTEXT) engine=myisam; +INSERT INTO t1 VALUES ('a'); +SELECT 1 FROM (SELECT ROUND(f1) AS a FROM t1) AS s WHERE a LIKE 'a'; +SELECT 1 FROM (SELECT ROUND(f1, f1) AS a FROM t1) AS s WHERE a LIKE 'a'; +DROP TABLE t1; + --echo End of 5.0 tests # diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test index 5f37cd2a13e..294efa8caf1 100644 --- a/mysql-test/t/func_set.test +++ b/mysql-test/t/func_set.test @@ -84,3 +84,16 @@ engine=myisam default charset=latin1; insert into t1 values (''),(null),(null),(''),(''),(''); select find_in_set(f1,f1) as a from t1,(select find_in_set(f1,f1) as b from t1) a; drop table t1; +# +# Bug#45168: assertion with convert() and empty set value +# +CREATE TABLE t1( a SET('a', 'b', 'c') ); +CREATE TABLE t2( a SET('a', 'b', 'c') ); + +INSERT INTO t1 VALUES ('d'); +INSERT INTO t2 VALUES (''); + +SELECT CONVERT( a USING latin1 ) FROM t1; +SELECT CONVERT( a USING latin1 ) FROM t2; + +DROP TABLE t1, t2; diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 0dae4509518..4a60e777cc7 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -667,4 +667,28 @@ desc v1; drop view v1; drop table t1; +# +# Bug#44684: valgrind reports invalid reads in +# Item_func_spatial_collection::val_str +# +SELECT MultiPoint(12345,''); +SELECT MultiPoint(123451,''); +SELECT MultiPoint(1234512,''); +SELECT MultiPoint(12345123,''); + +SELECT MultiLineString(12345,''); +SELECT MultiLineString(123451,''); +SELECT MultiLineString(1234512,''); +SELECT MultiLineString(12345123,''); + +SELECT LineString(12345,''); +SELECT LineString(123451,''); +SELECT LineString(1234512,''); +SELECT LineString(12345123,''); + +SELECT Polygon(12345,''); +SELECT Polygon(123451,''); +SELECT Polygon(1234512,''); +SELECT Polygon(12345123,''); + --echo End of 5.1 tests diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 2e42bdbf06c..bcd393bd6ab 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1471,5 +1471,59 @@ DROP DATABASE dbbug33464; SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators; +# +# Bug#44658 Create procedure makes server crash when user does not have ALL privilege +# +CREATE USER user1; +CREATE USER user2; +GRANT CREATE ON db1.* TO 'user1'@'localhost'; +GRANT CREATE ROUTINE ON db1.* TO 'user1'@'localhost'; +GRANT CREATE ON db1.* TO 'user2'@'%'; +GRANT CREATE ROUTINE ON db1.* TO 'user2'@'%'; +FLUSH PRIVILEGES; +SHOW GRANTS FOR 'user1'@'localhost'; +connect (con1,localhost,user1,,); +--echo ** Connect as user1 and create a procedure. +--echo ** The creation will imply implicitly assigned +--echo ** EXECUTE and ALTER ROUTINE privileges to +--echo ** the current user user1@localhost. +SELECT @@GLOBAL.sql_mode; +SELECT @@SESSION.sql_mode; +CREATE DATABASE db1; +DELIMITER ||; +CREATE PROCEDURE db1.proc1(p1 INT) + BEGIN + SET @x = 0; + REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT; + END ;|| +DELIMITER ;|| + +connect (con2,localhost,user2,,); +--echo ** Connect as user2 and create a procedure. +--echo ** Implicitly assignment of privileges will +--echo ** fail because the user2@localhost is an +--echo ** unknown user. +DELIMITER ||; +CREATE PROCEDURE db1.proc2(p1 INT) + BEGIN + SET @x = 0; + REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT; + END ;|| +DELIMITER ;|| + +connection default; +SHOW GRANTS FOR 'user1'@'localhost'; +SHOW GRANTS FOR 'user2'; +disconnect con1; +disconnect con2; +DROP PROCEDURE db1.proc1; +DROP PROCEDURE db1.proc2; +REVOKE ALL ON db1.* FROM 'user1'@'localhost'; +REVOKE ALL ON db1.* FROM 'user2'@'%'; +DROP USER 'user1'; +DROP USER 'user1'@'localhost'; +DROP USER 'user2'; +DROP DATABASE db1; + # Wait till we reached the initial number of concurrent sessions --source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test index adfa77c881c..981be3efece 100644 --- a/mysql-test/t/group_min_max.test +++ b/mysql-test/t/group_min_max.test @@ -982,4 +982,39 @@ SELECT DISTINCT c FROM t1 WHERE d=4; DROP TABLE t1; +--echo # +--echo # Bug #45386: Wrong query result with MIN function in field list, +--echo # WHERE and GROUP BY clause +--echo # + +CREATE TABLE t (a INT, b INT, INDEX (a,b)); +INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1); +INSERT INTO t SELECT * FROM t; + +--echo # test MIN +--echo #should use range with index for group by +EXPLAIN +SELECT a, MIN(b) FROM t WHERE b <> 0 GROUP BY a; +--echo #should return 1 row +SELECT a, MIN(b) FROM t WHERE b <> 0 GROUP BY a; + +--echo # test MAX +--echo #should use range with index for group by +EXPLAIN +SELECT a, MAX(b) FROM t WHERE b <> 1 GROUP BY a; +--echo #should return 1 row +SELECT a, MAX(b) FROM t WHERE b <> 1 GROUP BY a; + +--echo # test 3 ranges and use the middle one +INSERT INTO t SELECT a, 2 FROM t; + +--echo #should use range with index for group by +EXPLAIN +SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a; +--echo #should return 1 row +SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a; + +DROP TABLE t; + + --echo End of 5.0 tests diff --git a/mysql-test/t/innodb_bug21704.test b/mysql-test/t/innodb_bug21704.test new file mode 100644 index 00000000000..c649b61034c --- /dev/null +++ b/mysql-test/t/innodb_bug21704.test @@ -0,0 +1,96 @@ +-- source include/have_innodb.inc + +--echo # +--echo # Bug#21704: Renaming column does not update FK definition. +--echo # + +--echo +--echo # Test that it's not possible to rename columns participating in a +--echo # foreign key (either in the referencing or referenced table). +--echo + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +--enable_warnings + +CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB; + +CREATE TABLE t2 (a INT PRIMARY KEY, b INT, + CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a)) +ROW_FORMAT=COMPACT ENGINE=INNODB; + +CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT, + CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a)) +ROW_FORMAT=COMPACT ENGINE=INNODB; + +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +INSERT INTO t2 VALUES (1,1),(2,2),(3,3); +INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3); + +--echo +--echo # Test renaming the column in the referenced table. +--echo + +# mysqltest first does replace_regex, then replace_result +--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ +# Embedded server doesn't chdir to data directory +--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' +--error ER_ERROR_ON_RENAME +ALTER TABLE t1 CHANGE a c INT; + +--echo # Ensure that online column rename works. + +--enable_info +ALTER TABLE t1 CHANGE b c INT; +--disable_info + +--echo +--echo # Test renaming the column in the referencing table +--echo + +# mysqltest first does replace_regex, then replace_result +--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ +# Embedded server doesn't chdir to data directory +--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' +--error ER_ERROR_ON_RENAME +ALTER TABLE t2 CHANGE a c INT; + +--echo # Ensure that online column rename works. + +--enable_info +ALTER TABLE t2 CHANGE b c INT; +--disable_info + +--echo +--echo # Test with self-referential constraints +--echo + +# mysqltest first does replace_regex, then replace_result +--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ +# Embedded server doesn't chdir to data directory +--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' +--error ER_ERROR_ON_RENAME +ALTER TABLE t3 CHANGE a d INT; + +# mysqltest first does replace_regex, then replace_result +--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ +# Embedded server doesn't chdir to data directory +--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' +--error ER_ERROR_ON_RENAME +ALTER TABLE t3 CHANGE b d INT; + +--echo # Ensure that online column rename works. + +--enable_info +ALTER TABLE t3 CHANGE c d INT; +--disable_info + +--echo +--echo # Cleanup. +--echo + +DROP TABLE t3; +DROP TABLE t2; +DROP TABLE t1; diff --git a/mysql-test/t/innodb_bug40565.test b/mysql-test/t/innodb_bug40565.test new file mode 100644 index 00000000000..d7aa0fd514a --- /dev/null +++ b/mysql-test/t/innodb_bug40565.test @@ -0,0 +1,10 @@ +# Bug #40565 Update Query Results in "1 Row Affected" But Should Be "Zero Rows" +-- source include/have_innodb.inc + +create table bug40565(value decimal(4,2)) engine=innodb; +insert into bug40565 values (1), (null); +--enable_info +update bug40565 set value=NULL; +update bug40565 set value=NULL; +--disable_info +drop table bug40565; diff --git a/mysql-test/t/innodb_bug42101-nonzero.test b/mysql-test/t/innodb_bug42101-nonzero.test index c691a234c51..685fdf20489 100644 --- a/mysql-test/t/innodb_bug42101-nonzero.test +++ b/mysql-test/t/innodb_bug42101-nonzero.test @@ -12,6 +12,8 @@ set global innodb_commit_concurrency=1; select @@innodb_commit_concurrency; set global innodb_commit_concurrency=42; select @@innodb_commit_concurrency; +set global innodb_commit_concurrency=DEFAULT; +select @@innodb_commit_concurrency; --error ER_WRONG_ARGUMENTS set global innodb_commit_concurrency=0; select @@innodb_commit_concurrency; diff --git a/mysql-test/t/innodb_bug42101.test b/mysql-test/t/innodb_bug42101.test index 13d531ecde7..b6536490d48 100644 --- a/mysql-test/t/innodb_bug42101.test +++ b/mysql-test/t/innodb_bug42101.test @@ -15,3 +15,5 @@ set global innodb_commit_concurrency=42; select @@innodb_commit_concurrency; set global innodb_commit_concurrency=0; select @@innodb_commit_concurrency; +set global innodb_commit_concurrency=DEFAULT; +select @@innodb_commit_concurrency; diff --git a/mysql-test/t/innodb_bug45357.test b/mysql-test/t/innodb_bug45357.test new file mode 100644 index 00000000000..81727f352dd --- /dev/null +++ b/mysql-test/t/innodb_bug45357.test @@ -0,0 +1,10 @@ +-- source include/have_innodb.inc + +set session transaction isolation level read committed; + +create table bug45357(a int, b int,key(b))engine=innodb; +insert into bug45357 values (25170,6122); +update bug45357 set a=1 where b=30131; +delete from bug45357 where b < 20996; +delete from bug45357 where b < 7001; +drop table bug45357; diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index 1b2b861dffb..c643465b2f3 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -359,4 +359,106 @@ SELECT * FROM t4; DROP TABLE t1, t2, t3, t4; +--echo # +--echo # Bug#44886: SIGSEGV in test_if_skip_sort_order() - +--echo # uninitialized variable used as subscript +--echo # + +CREATE TABLE t1 (a INT, b INT, c INT, d INT, PRIMARY KEY (b), KEY (a,c)) + ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1,1,0); + +CREATE TABLE t2 (a INT, b INT, e INT, KEY (e)) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1,1,2); + +CREATE TABLE t3 (a INT, b INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (1, 1); + +SELECT * FROM t1, t2, t3 + WHERE t1.a = t3.a AND (t1.b = t3.b OR t1.d) AND t2.b = t1.b AND t2.e = 2 + GROUP BY t1.b; + +DROP TABLE t1, t2, t3; + +--echo # +--echo # Bug #45828: Optimizer won't use partial primary key if another +--echo # index can prevent filesort +--echo # + +# Create the table +CREATE TABLE `t1` ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 int NOT NULL, + PRIMARY KEY (c1,c2), + KEY (c3) +) ENGINE=InnoDB; + +# populate with data +INSERT INTO t1 VALUES (5,2,1246276747); +INSERT INTO t1 VALUES (2,1,1246281721); +INSERT INTO t1 VALUES (7,3,1246281756); +INSERT INTO t1 VALUES (4,2,1246282139); +INSERT INTO t1 VALUES (3,1,1246282230); +INSERT INTO t1 VALUES (1,0,1246282712); +INSERT INTO t1 VALUES (8,3,1246282765); +INSERT INTO t1 SELECT c1+10,c2+10,c3+10 FROM t1; +INSERT INTO t1 SELECT c1+100,c2+100,c3+100 from t1; +INSERT INTO t1 SELECT c1+1000,c2+1000,c3+1000 from t1; +INSERT INTO t1 SELECT c1+10000,c2+10000,c3+10000 from t1; +INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1; +INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1; + +# query and no rows will match the c1 condition, whereas all will match c3 +SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3; + +# SHOULD use the pk. +# index on c3 will be used instead of primary key +EXPLAIN SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3; + +# if we force the primary key, we can see the estimate is 1 +EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3; + + +CREATE TABLE t2 ( + c1 int NOT NULL, + c2 int NOT NULL, + c3 int NOT NULL, + KEY (c1,c2), + KEY (c3) +) ENGINE=InnoDB; + +# SHOULD use the pk. +# if we switch it from a primary key to a regular index, it works correctly as well +explain SELECT * FROM t2 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3; + +DROP TABLE t1,t2; + + +--echo # +--echo # 36259: Optimizing with ORDER BY +--echo # + +CREATE TABLE t1 ( + a INT NOT NULL AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL, + d VARCHAR(5), + e INT NOT NULL, + PRIMARY KEY (a), KEY i2 (b,c,d) +) ENGINE=InnoDB; + +INSERT INTO t1 (b,c,d,e) VALUES (1,1,'a',1), (2,2,'b',2); +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1; +EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a; +EXPLAIN SELECT * FROM t1 FORCE INDEX(i2) WHERE b=1 and c=1 ORDER BY a; +EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a; + +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/mysql-test/t/log_tables_debug.test b/mysql-test/t/log_tables_debug.test new file mode 100644 index 00000000000..19a62614608 --- /dev/null +++ b/mysql-test/t/log_tables_debug.test @@ -0,0 +1,94 @@ +### t/log_tables_debug.test +# +# Log-related tests requiring a debug-build server. +# + +# extra clean-up required due to Bug#38124, set to 1 when behavior has +# changed (see explanation in log_state.test) +let $fixed_bug38124 = 0; + +--source include/have_debug.inc + +# Several subtests modify global variables. Save the initial values only here, +# but reset to the initial values per subtest. +SET @old_general_log= @@global.general_log; +SET @old_general_log_file= @@global.general_log_file; +SET @old_slow_query_log= @@global.slow_query_log; +SET @old_slow_query_log_file= @@global.slow_query_log_file; + + +--echo # +--echo # Bug#45387 Information about statement id for prepared +--echo # statements missed from general log +--echo # + +let MYSQLD_DATADIR= `SELECT @@datadir`; + +# set logging to our specific bug log to control the entries added +SET @@global.general_log = ON; +SET @@global.general_log_file = 'bug45387_general.log'; + +# turn on output of timestamps on all log file entries +SET SESSION debug='+d,reset_log_last_time'; + +let CONN_ID= `SELECT CONNECTION_ID()`; +FLUSH LOGS; + +# reset log settings +SET @@global.general_log = @old_general_log; +SET @@global.general_log_file = @old_general_log_file; +SET SESSION debug='-d'; + +perl; + # get the relevant info from the surrounding perl invocation + $datadir= $ENV{'MYSQLD_DATADIR'}; + $conn_id= $ENV{'CONN_ID'}; + + # loop through the log file looking for the stmt querying for conn id + open(FILE, "$datadir/bug45387_general.log") or + die("Unable to read log file $datadir/bug45387_general.log: $!\n"); + while(<FILE>) { + if (/\d{6}\s+\d+:\d+:\d+[ \t]+(\d+)[ \t]+Query[ \t]+SELECT CONNECTION_ID/) { + $found= $1; + break; + } + } + + # print the result + if ($found == $conn_id) { + print "Bug#45387: ID match.\n"; + } else { + print "Bug#45387: Expected ID '$conn_id', found '$found' in log file.\n"; + print "Contents of log file:\n"; + seek(FILE, 0, 0); + while($line= <FILE>) { + print $line; + } + } + + close(FILE); +EOF + +--remove_file $MYSQLD_DATADIR/bug45387_general.log + +--echo End of 5.1 tests + + +--echo # +--echo # Cleanup +--echo # + +# Reset global system variables to initial values if forgotten somewhere above. +SET global general_log = @old_general_log; +SET global general_log_file = @old_general_log_file; +SET global slow_query_log = @old_slow_query_log; +SET global slow_query_log_file = @old_slow_query_log_file; +if(!$fixed_bug38124) +{ + --disable_query_log + let $my_var = `SELECT @old_general_log_file`; + eval SET @@global.general_log_file = '$my_var'; + let $my_var = `SELECT @old_slow_query_log_file`; + eval SET @@global.slow_query_log_file = '$my_var'; + --enable_query_log +} diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 5315c91daa6..8760876b7ee 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -1535,4 +1535,24 @@ SELECT * FROM m1; DROP VIEW v1; DROP TABLE m1, t1; + +--echo # +--echo # Bug #45796: invalid memory reads and writes when altering merge and +--echo # base tables +--echo # + +CREATE TABLE t1(c1 INT) ENGINE=MyISAM; +CREATE TABLE m1(c1 INT) ENGINE=MERGE UNION=(t1); +ALTER TABLE m1 ADD INDEX idx_c1(c1); +# Open the MERGE table and allocate buffers based on children's definition. +--error ER_WRONG_MRG_TABLE +SELECT * FROM m1; +# Change the child table definition. +ALTER TABLE t1 ADD INDEX idx_c1(c1); +# Check that old buffers are not reused +SELECT * FROM m1; + +DROP TABLE m1; +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/mysql-test/t/multi_update2.test b/mysql-test/t/multi_update2.test index 47f9bc7bad7..a04518f4964 100644 --- a/mysql-test/t/multi_update2.test +++ b/mysql-test/t/multi_update2.test @@ -2,14 +2,46 @@ # Test of update statement that uses many tables. # ---disable_warnings -DROP TABLE IF EXISTS t1,t2; ---enable_warnings +# +# If we are running with +# - Valgrind -> $VALGRIND_TEST <> 0 +# - debug tracing -> @@session.debug LIKE '%trace%' +# the resource consumption (storage space needed, runtime) will be extreme. +# Therefore we require that the option "--big-test" is also set. +# + +let $need_big= 0; +--disable_query_log +--error 0,ER_UNKNOWN_SYSTEM_VARIABLE +SET @aux = @@session.debug; +if (!$mysql_errno) +{ + # We have returncode 0 = the server system variable @@session.debug exists. + # But we only need "--big-test" in case of tracing. + if (`SELECT @@session.debug LIKE '%trace%'`) + { + let $need_big= 1; + } +} +--enable_query_log +if ($VALGRIND_TEST) +{ + # We are running with Valgrind + inc $need_big; +} +if (`SELECT '$BIG_TEST' = '' AND $need_big = 1`) +{ + --skip Need "--big-test" when running with the option "--debug" or "--valgrind" +} # # Bug#1820 Rows not deleted from second table on multi-table delete # +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings + CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ; --echo # The protocolling of many inserts into t1 is suppressed. --disable_query_log diff --git a/mysql-test/t/mysql-bug45236.test b/mysql-test/t/mysql-bug45236.test new file mode 100644 index 00000000000..efc10ed19ea --- /dev/null +++ b/mysql-test/t/mysql-bug45236.test @@ -0,0 +1,45 @@ +# +# Bug #45236: large blob inserts from mysqldump fail, possible memory issue ? +# +# This test consumes a significant amount of resources. +# Therefore it should be kept separated from other tests. +# Otherwise we might suffer from problems like +# Bug#43801 mysql.test takes too long, fails due to expired timeout +# on debx86-b in PB +# + +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# Have to change the global variable as the session variable is +# read-only. +SET @old_max_allowed_packet= @@global.max_allowed_packet; +# ~1 MB blob length + some space for the rest of INSERT query +SET @@global.max_allowed_packet = 1024 * 1024 + 1024; + +# Create a new connection since the global max_allowed_packet +# has no effect onr the current one +connect (con1, localhost, root,,); + +CREATE TABLE t1(data LONGBLOB); +INSERT INTO t1 SELECT CONCAT(REPEAT('1', 1024*1024 - 27), + "\'\r dummydb dummyhost"); + +let $outfile= $MYSQLTEST_VARDIR/tmp/bug41486.sql; +--error 0,1 +remove_file $outfile; +--exec $MYSQL_DUMP --compact -t test t1 > $outfile +# Check that the mysql client does not interpret the "\r" sequence as a command +--exec $MYSQL --max_allowed_packet=1M test < $outfile 2>&1 + +DROP TABLE t1; + +# Cleanup +disconnect con1; +--source include/wait_until_disconnected.inc +remove_file $outfile; +connection default; +SET @@global.max_allowed_packet = @old_max_allowed_packet; diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index ba5cc243c01..2bb9a02e9d7 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -349,6 +349,14 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql; --exec $MYSQL --ignore-spaces -e "SELECT COUNT (*)" --exec $MYSQL -b -i -e "SELECT COUNT (*)" +# +# Bug#37268 'binary' character set makes CLI-internal commands case sensitive +# +--replace_regex /\([0-9]*\)/(errno)/ +--error 1 +--exec $MYSQL --default-character-set=binary test -e "CONNECT test invalid_hostname" 2>&1 +--exec $MYSQL --default-character-set=binary test -e "DELIMITER //" 2>&1 + --echo End of 5.0 tests # diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 4edf887a6b7..ec96124e14b 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1395,9 +1395,6 @@ drop user mysqltest_1@localhost; --echo # ---echo # Bug#21527 mysqldump incorrectly tries to LOCK TABLES on the ---echo # information_schema database. ---echo # --echo # Bug#21424 mysqldump failing to export/import views --echo # @@ -1463,6 +1460,13 @@ disconnect root; --remove_file $MYSQLTEST_VARDIR/tmp/bug21527.sql use test; +--echo # +--echo # Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the +--echo # information_schema database. +--echo # +--echo # Bug #33762: mysqldump can not dump INFORMATION_SCHEMA +--echo # +--exec $MYSQL_DUMP --compact --opt -d information_schema TABLES --echo # --echo # Bug#19745 mysqldump --xml produces invalid xml @@ -1698,9 +1702,6 @@ DROP TABLE t1; # Added for use-thread option # -# THIS PART OF THE TEST IS DISABLED UNTIL Bug#32991 IS FIXED -if ($bug32991_fixed) { - create table t1 (a text , b text); create table t2 (a text , b text); insert t1 values ("Duck, Duck", "goose"); @@ -1738,8 +1739,6 @@ drop table t2; drop table words2; -} - --echo # --echo # Bug#16853 mysqldump doesn't show events --echo # @@ -1955,6 +1954,59 @@ SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT; ########################################################################### +--echo +--echo Bug #34861 - mysqldump with --tab gives weird output for triggers. +--echo + +CREATE TABLE t1 (f1 INT); +CREATE TRIGGER tr1 BEFORE UPDATE ON t1 FOR EACH ROW SET @f1 = 1; +CREATE PROCEDURE pr1 () SELECT "Meow"; +CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT "Meow"; + +--echo +SHOW TRIGGERS; +SHOW EVENTS; +SELECT name,body FROM mysql.proc WHERE NAME = 'pr1'; + +--echo +--echo dump table; if anything goes to stdout, it ends up here: --------------- +--exec $MYSQL_DUMP --compact --routines --triggers --events --result-file=$MYSQLTEST_VARDIR/tmp/test_34861.sql --tab=$MYSQLTEST_VARDIR/tmp/ test + +--echo +--echo drop everything +DROP EVENT ev1; +DROP TRIGGER tr1; +DROP TABLE t1; +DROP PROCEDURE pr1; + +--echo +--echo reload table; this should restore table and trigger +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql +SHOW TRIGGERS; +SHOW EVENTS; +SELECT name,body FROM mysql.proc WHERE NAME = 'pr1'; + +--echo +--echo reload db; this should restore routines and events +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/test_34861.sql +SHOW TRIGGERS; +SHOW EVENTS; +SELECT name,body FROM mysql.proc WHERE NAME = 'pr1'; + +--echo +--echo cleanup +--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt +--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql +--remove_file $MYSQLTEST_VARDIR/tmp/test_34861.sql +--disable_warnings +DROP EVENT IF EXISTS ev1; +DROP PROCEDURE IF EXISTS pr1; +DROP TRIGGER IF EXISTS tr1; +DROP TABLE IF EXISTS t1; +--enable_warnings + +########################################################################### + --echo # --echo # End of 5.1 tests --echo # diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index ce89609de39..8b4af201af2 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1935,7 +1935,58 @@ INSERT INTO t1 VALUES (10), (100), (200), (300), (400); EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a>=200; DROP TABLE t1; ---echo End of 5.1 tests +# +# Bug#44821: select distinct on partitioned table returns wrong results +# +CREATE TABLE t1 ( a INT, b INT, c INT, KEY bc(b, c) ) +PARTITION BY KEY (a, b) PARTITIONS 3 +; + +INSERT INTO t1 VALUES +(17, 1, -8), +(3, 1, -7), +(23, 1, -6), +(22, 1, -5), +(11, 1, -4), +(21, 1, -3), +(19, 1, -2), +(30, 1, -1), + +(20, 1, 1), +(16, 1, 2), +(18, 1, 3), +(9, 1, 4), +(15, 1, 5), +(28, 1, 6), +(29, 1, 7), +(25, 1, 8), +(10, 1, 9), +(13, 1, 10), +(27, 1, 11), +(24, 1, 12), +(12, 1, 13), +(26, 1, 14), +(14, 1, 15) +; + +SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c; + +EXPLAIN +SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c; +DROP TABLE t1; + +--echo # +--echo # Bug #45807: crash accessing partitioned table and sql_mode +--echo # contains ONLY_FULL_GROUP_BY +--echo # + +SET SESSION SQL_MODE='ONLY_FULL_GROUP_BY'; +CREATE TABLE t1(id INT,KEY(id)) ENGINE=MYISAM + PARTITION BY HASH(id) PARTITIONS 2; +DROP TABLE t1; +SET SESSION SQL_MODE=DEFAULT; + +--echo End of 5.1 tests SET @@global.general_log= @old_general_log; diff --git a/mysql-test/t/query_cache_debug.test b/mysql-test/t/query_cache_debug.test index 8cf5e9d4b16..d30cd458e99 100644 --- a/mysql-test/t/query_cache_debug.test +++ b/mysql-test/t/query_cache_debug.test @@ -112,3 +112,148 @@ DROP TABLE t1,t2; SET GLOBAL concurrent_insert= DEFAULT; SET GLOBAL query_cache_size= DEFAULT; SET GLOBAL query_cache_type= DEFAULT; + + +--echo # +--echo # Bug43758 Query cache can lock up threads in 'freeing items' state +--echo # +FLUSH STATUS; +SET GLOBAL query_cache_type=DEMAND; +SET GLOBAL query_cache_size= 1024*768; +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4,t5; +--enable_warnings +CREATE TABLE t1 (a VARCHAR(100)); +CREATE TABLE t2 (a VARCHAR(100)); +CREATE TABLE t3 (a VARCHAR(100)); +CREATE TABLE t4 (a VARCHAR(100)); +CREATE TABLE t5 (a VARCHAR(100)); + +INSERT INTO t1 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +INSERT INTO t2 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +INSERT INTO t3 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +INSERT INTO t4 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +INSERT INTO t5 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); + +connect (thd2, localhost, root, ,test); +connect (thd3, localhost, root, ,test); +connect (thd1, localhost, root, ,test); + +connection thd1; +--echo =================================== Connection thd1 +--echo ** +--echo ** Load Query Cache with a result set and one table. +--echo ** +SELECT SQL_CACHE * FROM t1; +--echo ************************************************************************* +--echo ** We want to accomplish the following state: +--echo ** - Query cache status: TABLE_FLUSH_IN_PROGRESS +--echo ** - THD1: invalidate_table_internal (iterating query blocks) +--echo ** - THD2: query_cache_insert (cond_wait) +--echo ** - THD3: query_cache_insert (cond_wait) +--echo ** - No thread should be holding the structure_guard_mutex. +--echo ** +--echo ** First step is to place a DELETE-statement on the debug hook just +--echo ** before the mutex lock in invalidate_table_internal. +--echo ** This will allow new result sets to be written into the QC. +--echo ** +SET SESSION debug='+d,wait_in_query_cache_invalidate1'; +SET SESSION debug='+d,wait_in_query_cache_invalidate2'; +--send DELETE FROM t1 WHERE a like '%a%'; + +connection default; +--echo =================================== Connection default +--echo ** Assert that the expect process status is obtained. +LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 1 FROM information_schema.processlist WHERE state= 'wait_in_query_cache_invalidate1'; +--source include/wait_condition.inc +-- echo ** + +connection thd2; +--echo =================================== Connection thd2 +--echo ** On THD2: Insert a result into the cache. This attempt will be blocked +--echo ** because of a debug hook placed just before the mutex lock after which +--echo ** the first part of the result set is written. +SET SESSION debug='+d,wait_in_query_cache_insert'; +--send SELECT SQL_CACHE * FROM t2 UNION SELECT * FROM t3 + +connection thd3; +--echo =================================== Connection thd3 +--echo ** On THD3: Insert another result into the cache and block on the same +--echo ** debug hook. +SET SESSION debug='+d,wait_in_query_cache_insert'; +--send SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5; + +connection default; +--echo =================================== Connection default +--echo ** Assert that the two SELECT-stmt threads to reach the hook. +LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 2 FROM information_schema.processlist WHERE state='wait_in_query_cache_insert'; +--source include/wait_condition.inc +--echo ** +--echo ** + +--echo ** Signal the DELETE thread, THD1, to continue. It will enter the mutex +--echo ** lock and set query cache status to TABLE_FLUSH_IN_PROGRESS and then +--echo ** unlock the mutex before stopping on the next debug hook. +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate1' LIMIT 1 INTO @flush_thread_id; +KILL QUERY @flush_thread_id; +--echo ** Assert that we reach the next debug hook. +LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 1 FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate2'; +--source include/wait_condition.inc + +--echo ** +--echo ** Signal the remaining debug hooks blocking THD2 and THD3. +--echo ** The threads will grab the guard mutex enter the wait condition and +--echo ** and finally release the mutex. The threads will continue to wait +--echo ** until a broadcast signal reaches them causing both threads to +--echo ** come alive and check the condition. +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id ASC LIMIT 1 INTO @thread_id; +KILL QUERY @thread_id; +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id DESC LIMIT 1 INTO @thread_id; +KILL QUERY @thread_id; + +--echo ** +--echo ** Finally signal the DELETE statement on THD1 one last time. +--echo ** The stmt will complete the query cache invalidation and return +--echo ** cache status to NO_FLUSH_IN_PROGRESS. On the status change +--echo ** One signal will be sent to the thread group waiting for executing +--echo ** invalidations and a broadcast signal will be sent to the thread +--echo ** group holding result set writers. +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate2' LIMIT 1 INTO @flush_thread_id; +KILL QUERY @flush_thread_id; + +--echo ** +--echo ************************************************************************* +--echo ** No tables should be locked +connection thd2; +--echo =================================== Connection thd2 +reap; +DELETE FROM t1; +DELETE FROM t2; +DELETE FROM t3; + +connection thd3; +--echo =================================== Connection thd3 +reap; +DELETE FROM t4; +DELETE FROM t5; + +connection thd1; +--echo =================================== Connection thd1 +reap; + +--echo ** Done. + +connection default; +disconnect thd1; +disconnect thd2; +disconnect thd3; +SET GLOBAL query_cache_size= 0; + +connection default; +--echo # Restore defaults +RESET QUERY CACHE; +FLUSH STATUS; +DROP TABLE t1,t2,t3,t4,t5; +SET GLOBAL query_cache_size= DEFAULT; +SET GLOBAL query_cache_type= DEFAULT; +exit; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 715bdf0e667..7d3785ecccc 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3799,4 +3799,90 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a AND b=b) OR b > 20; EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND a=a) OR b > 20; DROP TABLE t1; + +--echo # +--echo # Bug#45266: Uninitialized variable lead to an empty result. +--echo # +--disable_warnings +drop table if exists A,AA,B,BB; +CREATE TABLE `A` ( + `pk` int(11) NOT NULL AUTO_INCREMENT, + `date_key` date NOT NULL, + `date_nokey` date NOT NULL, + `datetime_key` datetime NOT NULL, + `int_nokey` int(11) NOT NULL, + `time_key` time NOT NULL, + `time_nokey` time NOT NULL, + PRIMARY KEY (`pk`), + KEY `date_key` (`date_key`), + KEY `time_key` (`time_key`), + KEY `datetime_key` (`datetime_key`) +); + +CREATE TABLE `AA` ( + `pk` int(11) NOT NULL AUTO_INCREMENT, + `int_nokey` int(11) NOT NULL, + `time_key` time NOT NULL, + KEY `time_key` (`time_key`), + PRIMARY KEY (`pk`) +); + +CREATE TABLE `B` ( + `date_nokey` date NOT NULL, + `date_key` date NOT NULL, + `time_key` time NOT NULL, + `datetime_nokey` datetime NOT NULL, + `varchar_key` varchar(1) NOT NULL, + KEY `date_key` (`date_key`), + KEY `time_key` (`time_key`), + KEY `varchar_key` (`varchar_key`) +); + +INSERT INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x'); + +CREATE TABLE `BB` ( + `pk` int(11) NOT NULL AUTO_INCREMENT, + `int_nokey` int(11) NOT NULL, + `date_key` date NOT NULL, + `varchar_nokey` varchar(1) NOT NULL, + `date_nokey` date NOT NULL, + PRIMARY KEY (`pk`), + KEY `date_key` (`date_key`) +); + +INSERT INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18'); +# Test #1 +SELECT table1 . `pk` AS field1 + FROM + (BB AS table1 INNER JOIN + (AA AS table2 STRAIGHT_JOIN A AS table3 + ON ( table3 . `date_key` = table2 . `pk` )) + ON ( table3 . `datetime_key` = table2 . `int_nokey` )) + WHERE ( table3 . `date_key` <= 4 AND table2 . `pk` = table1 . `varchar_nokey`) + GROUP BY field1 ; + +SELECT table3 .`date_key` field1 + FROM + B table1 LEFT JOIN B table3 JOIN + (BB table6 JOIN A table7 ON table6 .`varchar_nokey`) + ON table6 .`int_nokey` ON table6 .`date_key` + WHERE NOT ( table1 .`varchar_key` AND table7 .`pk`) GROUP BY field1; + +# Test #2 +SELECT table4 . `time_nokey` AS field1 FROM + (AA AS table1 CROSS JOIN + (AA AS table2 STRAIGHT_JOIN + (B AS table3 STRAIGHT_JOIN A AS table4 + ON ( table4 . `date_key` = table3 . `time_key` )) + ON ( table4 . `pk` = table3 . `date_nokey` )) + ON ( table4 . `time_key` = table3 . `datetime_nokey` )) + WHERE ( table4 . `time_key` < table1 . `time_key` AND + table1 . `int_nokey` != 'f') + GROUP BY field1 ORDER BY field1 , field1; + +SELECT table1 .`time_key` field2 FROM B table1 LEFT JOIN BB JOIN A table5 ON table5 .`date_nokey` ON table5 .`int_nokey` GROUP BY field2; +--enable_warnings + +drop table A,AA,B,BB; +--echo #end of test for bug#45266 --echo End of 5.1 tests diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 8d7c6d75a34..66b960c938f 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -2435,3 +2435,16 @@ delimiter ;$$ # LOAD DATA INFILE '../../tmp/proc.txt' INTO TABLE mysql.proc; remove_file $MYSQLTEST_VARDIR/tmp/proc.txt; + +# +# Bug #38159: Function parsing problem generates misleading error message +# + +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,1), (2,2); +--error ER_FUNC_INEXISTENT_NAME_COLLISION +SELECT MAX (a) FROM t1 WHERE b = 999999; +SELECT AVG (a) FROM t1 WHERE b = 999999; +--error ER_SP_DOES_NOT_EXIST +SELECT non_existent (a) FROM t1 WHERE b = 999999; +DROP TABLE t1; diff --git a/mysql-test/t/sp-fib.test b/mysql-test/t/sp-fib.test new file mode 100644 index 00000000000..24a51b99c2d --- /dev/null +++ b/mysql-test/t/sp-fib.test @@ -0,0 +1,54 @@ +# Fibonacci, for recursion test. (Yet Another Numerical series :) +# Split from main.sp due to problems reported in Bug#15866 + +--disable_warnings +drop table if exists t3; +--enable_warnings +create table t3 ( f bigint unsigned not null ); + +# We deliberately do it the awkward way, fetching the last two +# values from the table, in order to exercise various statements +# and table accesses at each turn. +--disable_warnings +drop procedure if exists fib; +--enable_warnings + +# Now for multiple statements... +delimiter |; + +create procedure fib(n int unsigned) +begin + if n > 1 then + begin + declare x, y bigint unsigned; + declare c cursor for select f from t3 order by f desc limit 2; + open c; + fetch c into y; + fetch c into x; + insert into t3 values (x+y); + call fib(n-1); + ## Close the cursor AFTER the recursion to ensure that the stack + ## frame is somewhat intact. + close c; + end; + end if; +end| + +# Enable recursion +set @@max_sp_recursion_depth= 20| + +insert into t3 values (0), (1)| + +# The small number of recursion levels is intentional. +# We need to avoid +# Bug#15866 main.sp fails (thread stack limit +# insufficient for recursive call "fib(20)") +# which affects some platforms. +call fib(4)| + +select * from t3 order by f asc| + +drop table t3| +drop procedure fib| +set @@max_sp_recursion_depth= 0| + diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index fdf6ed8f382..5eeac457958 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -1561,61 +1561,6 @@ drop procedure ip| show procedure status where name like '%p%' and db='test'| -# Fibonacci, for recursion test. (Yet Another Numerical series :) -# ---disable_warnings -drop table if exists t3| ---enable_warnings -create table t3 ( f bigint unsigned not null )| - -# We deliberately do it the awkward way, fetching the last two -# values from the table, in order to exercise various statements -# and table accesses at each turn. ---disable_warnings -drop procedure if exists fib| ---enable_warnings -create procedure fib(n int unsigned) -begin - if n > 1 then - begin - declare x, y bigint unsigned; - declare c cursor for select f from t3 order by f desc limit 2; - - open c; - fetch c into y; - fetch c into x; - close c; - insert into t3 values (x+y); - call fib(n-1); - end; - end if; -end| - -# Enable recursion -set @@max_sp_recursion_depth= 20| - -# Minimum test: recursion of 3 levels - -insert into t3 values (0), (1)| - -call fib(3)| - -select * from t3 order by f asc| - -truncate table t3| - -# The original test, 20 levels, ran into memory limits on some machines -# and builds. Try 10 instead... - -insert into t3 values (0), (1)| - -call fib(10)| - -select * from t3 order by f asc| -drop table t3| -drop procedure fib| -set @@max_sp_recursion_depth= 0| - # # Comment & suid # diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index f540126c405..ecb37c1299c 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -346,6 +346,32 @@ drop table t1; set session low_priority_updates=default; # +# Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N +# +INSERT INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, +Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, +Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, +Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, +Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, +Create_user_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions, +max_updates, max_connections, max_user_connections) +VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', +'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '', +'', '', '', '0', '0', '0', '0'); +FLUSH PRIVILEGES; + +connect (con1, localhost, mysqltest_1,,); +connection con1; +CREATE PROCEDURE p1(i INT) BEGIN END; +disconnect con1; +connection default; +DROP PROCEDURE p1; + +DELETE FROM mysql.user WHERE User='mysqltest_1'; +FLUSH PRIVILEGES; + + +# # Restore global concurrent_insert value. Keep in the end of the test file. # diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test index acc9cc7979e..4a9f34443cb 100644 --- a/mysql-test/t/sql_mode.test +++ b/mysql-test/t/sql_mode.test @@ -308,3 +308,39 @@ flush privileges; --connection default drop user mysqltest_32753@localhost; + +# +# Bug#45100: Incomplete DROP USER in case of SQL_MODE = 'PAD_CHAR_TO_FULL_LENGTH' +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings + +# Generate some prerequisites +CREATE USER 'user_PCTFL'@'localhost' identified by 'PWD'; +CREATE USER 'user_no_PCTFL'@'localhost' identified by 'PWD'; + +CREATE TABLE t1 (f1 BIGINT); +CREATE TABLE t2 (f1 CHAR(3) NOT NULL, f2 CHAR(20)); + +# Grant privilege on a TABLE +GRANT ALL ON t1 TO 'user_PCTFL'@'localhost','user_no_PCTFL'@'localhost'; +# Grant privilege on some COLUMN of a table +GRANT SELECT(f1) ON t2 TO 'user_PCTFL'@'localhost','user_no_PCTFL'@'localhost'; + +SET @OLD_SQL_MODE = @@SESSION.SQL_MODE; +SET SESSION SQL_MODE = 'PAD_CHAR_TO_FULL_LENGTH'; +DROP USER 'user_PCTFL'@'localhost'; +SET SESSION SQL_MODE = @OLD_SQL_MODE; +DROP USER 'user_no_PCTFL'@'localhost'; + +FLUSH PRIVILEGES; + +SELECT * FROM mysql.db WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; +SELECT * FROM mysql.tables_priv WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; +SELECT * FROM mysql.columns_priv WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; + +# Cleanup +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 5842f59af5c..5da210f5a69 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -12,6 +12,12 @@ set @old_concurrent_insert= @@global.concurrent_insert; set @@global.concurrent_insert= 0; +# Disable logging to table, since this will also cause table locking and unlocking, which will +# show up in SHOW STATUS and may cause sporadic failures + +SET @old_log_output = @@global.log_output; +SET GLOBAL LOG_OUTPUT = 'FILE'; + # PS causes different statistics --disable_ps_protocol @@ -350,6 +356,7 @@ DROP FUNCTION f1; # Restore global concurrent_insert value. Keep in the end of the test file. --connection default set @@global.concurrent_insert= @old_concurrent_insert; +SET GLOBAL log_output = @old_log_output; # Wait till we reached the initial number of concurrent sessions --source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 9a5556c518d..1e55f9d5993 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -2370,4 +2370,30 @@ drop trigger trg1; drop trigger trg2; drop table t1, t2; +# +# Bug#44653: Server crash noticed when executing random queries with partitions. +# +CREATE TABLE t1 ( a INT, b INT ); +CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY, b INT ); + +INSERT INTO t1 (a) VALUES (1); + +delimiter //; +CREATE TRIGGER tr1 +BEFORE INSERT ON t2 +FOR EACH ROW +BEGIN + UPDATE a_nonextisting_table SET a = 1; +END// +delimiter ;// + +--disable_abort_on_error +CREATE TABLE IF NOT EXISTS t2 ( a INT, b INT ) SELECT a, b FROM t1; +--enable_abort_on_error + +# Caused failed assertion +SELECT * FROM t2; + +DROP TABLE t1, t2; + --echo End of 5.1 tests. diff --git a/mysql-test/t/trigger_notembedded.test b/mysql-test/t/trigger_notembedded.test index 9588ec6e3ed..7a7e6c6bc85 100644 --- a/mysql-test/t/trigger_notembedded.test +++ b/mysql-test/t/trigger_notembedded.test @@ -909,4 +909,27 @@ select * from t1; drop table t1; disconnect flush; +# +# Bug#45412 SHOW CREATE TRIGGER does not require privileges to disclose trigger data +# +CREATE DATABASE db1; +CREATE TABLE db1.t1 (a char(30)) ENGINE=MEMORY; +CREATE TRIGGER db1.trg AFTER INSERT ON db1.t1 FOR EACH ROW + INSERT INTO db1.t1 VALUES('Some very sensitive data goes here'); + +CREATE USER 'no_rights'@'localhost'; +REVOKE ALL ON *.* FROM 'no_rights'@'localhost'; +FLUSH PRIVILEGES; + +connect (con1,localhost,no_rights,,); +SELECT trigger_name FROM INFORMATION_SCHEMA.TRIGGERS + WHERE trigger_schema = 'db1'; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +SHOW CREATE TRIGGER db1.trg; + +connection default; +disconnect con1; +DROP USER 'no_rights'@'localhost'; +DROP DATABASE db1; + --echo End of 5.1 tests. diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 4cf9ea63dad..cd3c3f81510 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1257,3 +1257,32 @@ select cast(-3.4 as decimal(2,1)); select cast(99.6 as decimal(2,0)); select cast(-13.4 as decimal(2,1)); select cast(98.6 as decimal(2,0)); + +--echo # +--echo # Bug #45262: Bad effects with CREATE TABLE and DECIMAL +--echo # + +CREATE TABLE t1 SELECT .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +DESCRIBE t1; +SELECT my_col FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 SELECT 1 + .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +DESCRIBE t1; +SELECT my_col FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 SELECT 1 * .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +DESCRIBE t1; +SELECT my_col FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 SELECT 1 / .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +DESCRIBE t1; +SELECT my_col FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col; +DESCRIBE t1; +SELECT my_col FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index c568b79185d..1580d7f36d7 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -1217,4 +1217,13 @@ SET @@sql_safe_updates= @bug42778; DROP TABLE t1; +--echo # +--echo # BUG#10206 - InnoDB: Transaction requiring Max_BinLog_Cache_size > 4GB always rollsback +--echo # + +SET @old_max_binlog_cache_size = @@GLOBAL.max_binlog_cache_size; +--echo # Set the max_binlog_cache_size to size more than 4GB. +SET GLOBAL max_binlog_cache_size = 5 * 1024 * 1024 * 1024; +SELECT @@GLOBAL.max_binlog_cache_size; +SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size; --echo End of 5.1 tests diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index a788b5ab41e..7bec02e6fb6 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3703,6 +3703,38 @@ DROP TABLE t1; --echo # -- End of test case for Bug#40825 --echo +--echo # +--echo # Bug #45806 crash when replacing into a view with a join! +--echo # +CREATE TABLE t1(a INT UNIQUE); +CREATE VIEW v1 AS SELECT t1.a FROM t1, t1 AS a; +INSERT INTO t1 VALUES (1), (2); + +REPLACE INTO v1(a) SELECT 1 FROM t1,t1 AS c; +SELECT * FROM v1; +REPLACE INTO v1(a) SELECT 3 FROM t1,t1 AS c; +SELECT * FROM v1; +DELETE FROM t1 WHERE a=3; +INSERT INTO v1(a) SELECT 1 FROM t1,t1 AS c +ON DUPLICATE KEY UPDATE `v1`.`a`= 1; +SELECT * FROM v1; + +CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a; + +REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c; +SELECT * FROM v2; +REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c; +SELECT * FROM v2; +INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c +ON DUPLICATE KEY UPDATE `v2`.`a`= 1; +SELECT * FROM v2; + +DROP VIEW v1; +DROP VIEW v2; +DROP TABLE t1; + +--echo # -- End of test case for Bug#45806 + --echo # ----------------------------------------------------------------- --echo # -- End of 5.0 tests. --echo # ----------------------------------------------------------------- diff --git a/mysql-test/t/xa.test b/mysql-test/t/xa.test index 04ecf518577..7b1c6a268d5 100644 --- a/mysql-test/t/xa.test +++ b/mysql-test/t/xa.test @@ -124,6 +124,31 @@ drop table t1; --echo End of 5.0 tests +# +# Bug#44672: Assertion failed: thd->transaction.xid_state.xid.is_null() +# + +xa start 'a'; +xa end 'a'; +xa rollback 'a'; +xa start 'a'; +xa end 'a'; +xa rollback 'a'; + +# +# Bug#45548: XA transaction without access to InnoDB tables crashes the server +# + +xa start 'a'; +xa end 'a'; +xa prepare 'a'; +xa commit 'a'; + +xa start 'a'; +xa end 'a'; +xa prepare 'a'; +xa commit 'a'; + # Wait till all disconnects are completed --source include/wait_until_count_sessions.inc |