Loading mysql-test/extra/binlog_tests/binlog.test +13 −0 Original line number Diff line number Diff line Loading @@ -59,4 +59,17 @@ insert into t1 values(null); select * from t1; drop table t1; # bug#22027 create table t1 (a int); create table if not exists t2 select * from t1; # bug#22762 create temporary table tt1 (a int); create table if not exists t3 like tt1; --replace_column 2 # 5 # --replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// show binlog events from 102; drop table t1,t2,t3,tt1; -- source extra/binlog_tests/binlog_insert_delayed.test mysql-test/r/binlog_row_binlog.result +26 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,24 @@ select * from t1; id 127 drop table t1; create table t1 (a int); create table if not exists t2 select * from t1; create temporary table tt1 (a int); create table if not exists t3 like tt1; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key) 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`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) master-bin.000001 # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( `a` int(11) DEFAULT NULL ) master-bin.000001 # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) drop table t1,t2,t3,tt1; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; insert delayed into t1 values (207); Loading @@ -256,6 +274,14 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_incre 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`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) master-bin.000001 # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( `a` int(11) DEFAULT NULL ) master-bin.000001 # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) master-bin.000001 # Query 1 # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */ master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F Loading mysql-test/r/binlog_stm_binlog.result +20 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,21 @@ select * from t1; id 127 drop table t1; create table t1 (a int); create table if not exists t2 select * from t1; create temporary table tt1 (a int); create table if not exists t3 like tt1; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key) master-bin.000001 # Intvar 1 # INSERT_ID=127 master-bin.000001 # Query 1 # use `test`; insert into t1 values(null) master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) master-bin.000001 # Query 1 # use `test`; create table if not exists t2 select * from t1 master-bin.000001 # Query 1 # use `test`; create temporary table tt1 (a int) master-bin.000001 # Query 1 # use `test`; create table if not exists t3 like tt1 drop table t1,t2,t3,tt1; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; insert delayed into t1 values (207); Loading @@ -166,6 +181,11 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_incre master-bin.000001 # Intvar 1 # INSERT_ID=127 master-bin.000001 # Query 1 # use `test`; insert into t1 values(null) master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) master-bin.000001 # Query 1 # use `test`; create table if not exists t2 select * from t1 master-bin.000001 # Query 1 # use `test`; create temporary table tt1 (a int) master-bin.000001 # Query 1 # use `test`; create table if not exists t3 like tt1 master-bin.000001 # Query 1 # use `test`; drop table t1,t2,t3,tt1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F Loading mysql-test/r/ctype_ucs.result +22 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,28 @@ lily river drop table t1; deallocate prepare stmt; create table t1 ( a char(10) unicode not null, index a (a) ) engine=myisam; insert into t1 values (repeat(0x201f, 10)); insert into t1 values (repeat(0x2020, 10)); insert into t1 values (repeat(0x2021, 10)); explain select hex(a) from t1 order by a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL a 20 NULL 3 Using index select hex(a) from t1 order by a; hex(a) 201F201F201F201F201F201F201F201F201F201F 2020202020202020202020202020202020202020 2021202120212021202120212021202120212021 alter table t1 drop index a; select hex(a) from t1 order by a; hex(a) 201F201F201F201F201F201F201F201F201F201F 2020202020202020202020202020202020202020 2021202120212021202120212021202120212021 drop table t1; CREATE TABLE t1 (id int, s char(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci); INSERT INTO t1 VALUES (1, 'ZZZZZ'), (1, 'ZZZ'), (2, 'ZZZ'), (2, 'ZZZZZ'); SELECT id, MIN(s) FROM t1 GROUP BY id; Loading mysql-test/r/view.result +19 −0 Original line number Diff line number Diff line Loading @@ -2967,3 +2967,22 @@ ERROR HY000: CHECK OPTION failed 'test.v1' DROP VIEW v1; DROP TABLE t1; End of 5.0 tests. DROP DATABASE IF EXISTS `d-1`; CREATE DATABASE `d-1`; USE `d-1`; CREATE TABLE `t-1` (c1 INT); CREATE VIEW `v-1` AS SELECT c1 FROM `t-1`; SHOW TABLES; Tables_in_d-1 t-1 v-1 RENAME TABLE `t-1` TO `t-2`; RENAME TABLE `v-1` TO `v-2`; SHOW TABLES; Tables_in_d-1 t-2 v-2 DROP TABLE `t-2`; DROP VIEW `v-2`; DROP DATABASE `d-1`; USE test; Loading
mysql-test/extra/binlog_tests/binlog.test +13 −0 Original line number Diff line number Diff line Loading @@ -59,4 +59,17 @@ insert into t1 values(null); select * from t1; drop table t1; # bug#22027 create table t1 (a int); create table if not exists t2 select * from t1; # bug#22762 create temporary table tt1 (a int); create table if not exists t3 like tt1; --replace_column 2 # 5 # --replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// show binlog events from 102; drop table t1,t2,t3,tt1; -- source extra/binlog_tests/binlog_insert_delayed.test
mysql-test/r/binlog_row_binlog.result +26 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,24 @@ select * from t1; id 127 drop table t1; create table t1 (a int); create table if not exists t2 select * from t1; create temporary table tt1 (a int); create table if not exists t3 like tt1; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key) 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`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) master-bin.000001 # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( `a` int(11) DEFAULT NULL ) master-bin.000001 # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) drop table t1,t2,t3,tt1; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; insert delayed into t1 values (207); Loading @@ -256,6 +274,14 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_incre 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`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) master-bin.000001 # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( `a` int(11) DEFAULT NULL ) master-bin.000001 # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) master-bin.000001 # Query 1 # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */ master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F Loading
mysql-test/r/binlog_stm_binlog.result +20 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,21 @@ select * from t1; id 127 drop table t1; create table t1 (a int); create table if not exists t2 select * from t1; create temporary table tt1 (a int); create table if not exists t3 like tt1; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key) master-bin.000001 # Intvar 1 # INSERT_ID=127 master-bin.000001 # Query 1 # use `test`; insert into t1 values(null) master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) master-bin.000001 # Query 1 # use `test`; create table if not exists t2 select * from t1 master-bin.000001 # Query 1 # use `test`; create temporary table tt1 (a int) master-bin.000001 # Query 1 # use `test`; create table if not exists t3 like tt1 drop table t1,t2,t3,tt1; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; insert delayed into t1 values (207); Loading @@ -166,6 +181,11 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_incre master-bin.000001 # Intvar 1 # INSERT_ID=127 master-bin.000001 # Query 1 # use `test`; insert into t1 values(null) master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) master-bin.000001 # Query 1 # use `test`; create table if not exists t2 select * from t1 master-bin.000001 # Query 1 # use `test`; create temporary table tt1 (a int) master-bin.000001 # Query 1 # use `test`; create table if not exists t3 like tt1 master-bin.000001 # Query 1 # use `test`; drop table t1,t2,t3,tt1 master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F Loading
mysql-test/r/ctype_ucs.result +22 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,28 @@ lily river drop table t1; deallocate prepare stmt; create table t1 ( a char(10) unicode not null, index a (a) ) engine=myisam; insert into t1 values (repeat(0x201f, 10)); insert into t1 values (repeat(0x2020, 10)); insert into t1 values (repeat(0x2021, 10)); explain select hex(a) from t1 order by a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL a 20 NULL 3 Using index select hex(a) from t1 order by a; hex(a) 201F201F201F201F201F201F201F201F201F201F 2020202020202020202020202020202020202020 2021202120212021202120212021202120212021 alter table t1 drop index a; select hex(a) from t1 order by a; hex(a) 201F201F201F201F201F201F201F201F201F201F 2020202020202020202020202020202020202020 2021202120212021202120212021202120212021 drop table t1; CREATE TABLE t1 (id int, s char(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci); INSERT INTO t1 VALUES (1, 'ZZZZZ'), (1, 'ZZZ'), (2, 'ZZZ'), (2, 'ZZZZZ'); SELECT id, MIN(s) FROM t1 GROUP BY id; Loading
mysql-test/r/view.result +19 −0 Original line number Diff line number Diff line Loading @@ -2967,3 +2967,22 @@ ERROR HY000: CHECK OPTION failed 'test.v1' DROP VIEW v1; DROP TABLE t1; End of 5.0 tests. DROP DATABASE IF EXISTS `d-1`; CREATE DATABASE `d-1`; USE `d-1`; CREATE TABLE `t-1` (c1 INT); CREATE VIEW `v-1` AS SELECT c1 FROM `t-1`; SHOW TABLES; Tables_in_d-1 t-1 v-1 RENAME TABLE `t-1` TO `t-2`; RENAME TABLE `v-1` TO `v-2`; SHOW TABLES; Tables_in_d-1 t-2 v-2 DROP TABLE `t-2`; DROP VIEW `v-2`; DROP DATABASE `d-1`; USE test;