diff options
Diffstat (limited to 'mysql-test')
43 files changed, 7014 insertions, 457 deletions
diff --git a/mysql-test/include/binlog_formats.combinations b/mysql-test/include/binlog_formats.combinations new file mode 100644 index 00000000000..07042c2cbec --- /dev/null +++ b/mysql-test/include/binlog_formats.combinations @@ -0,0 +1,8 @@ +[row] +binlog-format=row + +[stmt] +binlog-format=statement + +[mix] +binlog-format=mixed diff --git a/mysql-test/include/binlog_formats.inc b/mysql-test/include/binlog_formats.inc new file mode 100644 index 00000000000..44d64293102 --- /dev/null +++ b/mysql-test/include/binlog_formats.inc @@ -0,0 +1,4 @@ +# This file adds combinations for all binlog formats: row, stmt, mix +# Under each combination a corresponding binlog-format option is set. + +--source include/have_log_bin.inc diff --git a/mysql-test/main/backup_log.result b/mysql-test/main/backup_log.result index 94590a220d4..6338425990c 100644 --- a/mysql-test/main/backup_log.result +++ b/mysql-test/main/backup_log.result @@ -69,7 +69,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY' create table t32 (a int) ; drop table if exists t30,t31,t32,tmp_t30; Warnings: -Note 1051 Unknown table 'test.t31,test.tmp_t30' +Note 1051 Unknown table 'test.tmp_t30' # # Testing create LIKE # @@ -182,56 +182,55 @@ CREATE,MyISAM,0,test,t30,id: 8,,0,,, CREATE,MyISAM,0,test,t31,id: 9,,0,,, DROP,MyISAM,0,test,t31,id: 9,,0,,, CREATE,MyISAM,0,test,t31,id: 10,,0,,, -DROP,MyISAM,0,test,t31,id: 10,,0,,, -DROP_AFTER_CREATE,MyISAM,0,test,t31,id: 11,,0,,, -CREATE,MyISAM,0,test,t32,id: 12,,0,,, +CREATE,MyISAM,0,test,t32,id: 11,,0,,, DROP,MyISAM,0,test,t30,id: 8,,0,,, -DROP,MyISAM,0,test,t32,id: 12,,0,,, -CREATE,MyISAM,0,test,t40,id: 13,,0,,, -CREATE,InnoDB,0,test,t41,id: 14,,0,,, -CREATE,MyISAM,0,test,t42,id: 15,,0,,, -DROP,MyISAM,0,test,t42,id: 15,,0,,, -CREATE,InnoDB,0,test,t42,id: 16,,0,,, -DROP,MyISAM,0,test,t40,id: 13,,0,,, -DROP,InnoDB,0,test,t41,id: 14,,0,,, -DROP,InnoDB,0,test,t42,id: 16,,0,,, -CREATE,MyISAM,0,test,t50,id: 17,,0,,, -CREATE,MyISAM,0,test,t51,id: 18,,0,,, -RENAME,MyISAM,0,test,t50,id: 17,MyISAM,0,test,t52,id: 17 -RENAME,MyISAM,0,test,t51,id: 18,MyISAM,0,test,t53,id: 18 -RENAME,MyISAM,0,test,t52,id: 17,MyISAM,0,test,tmp,id: 17 -RENAME,MyISAM,0,test,t53,id: 18,MyISAM,0,test,t52,id: 18 -RENAME,MyISAM,0,test,tmp,id: 17,MyISAM,0,test,t53,id: 17 -DROP,MyISAM,0,test,t52,id: 18,,0,,, -DROP,MyISAM,0,test,t53,id: 17,,0,,, -CREATE,Aria,0,test,t60,id: 19,,0,,, -CHANGE_INDEX,Aria,0,test,t60,id: 19,,0,,, -CHANGE_INDEX,Aria,0,test,t60,id: 19,,0,,, -DROP,Aria,0,test,t60,id: 19,,0,,, -CREATE,Aria,0,test,t70,id: 20,,0,,, -BULK_INSERT,Aria,0,test,t70,id: 20,,0,,, -BULK_INSERT,Aria,0,test,t70,id: 20,,0,,, -CREATE,Aria,0,test,t71,id: 21,,0,,, -BULK_INSERT,Aria,0,test,t71,id: 21,,0,,, -DROP,Aria,0,test,t70,id: 20,,0,,, -DROP,Aria,0,test,t71,id: 21,,0,,, -CREATE,MyISAM,0,test,t@00201,id: 22,,0,,, -DROP,MyISAM,0,test,t@00201,id: 22,,0,,, -CREATE,MyISAM,0,test,t80,id: 23,,0,,, +DROP,MyISAM,0,test,t31,id: 10,,0,,, +DROP,MyISAM,0,test,t32,id: 11,,0,,, +CREATE,MyISAM,0,test,t40,id: 12,,0,,, +CREATE,InnoDB,0,test,t41,id: 13,,0,,, +CREATE,MyISAM,0,test,t42,id: 14,,0,,, +DROP,MyISAM,0,test,t42,id: 14,,0,,, +CREATE,InnoDB,0,test,t42,id: 15,,0,,, +DROP,MyISAM,0,test,t40,id: 12,,0,,, +DROP,InnoDB,0,test,t41,id: 13,,0,,, +DROP,InnoDB,0,test,t42,id: 15,,0,,, +CREATE,MyISAM,0,test,t50,id: 16,,0,,, +CREATE,MyISAM,0,test,t51,id: 17,,0,,, +RENAME,MyISAM,0,test,t50,id: 16,MyISAM,0,test,t52,id: 16 +RENAME,MyISAM,0,test,t51,id: 17,MyISAM,0,test,t53,id: 17 +RENAME,MyISAM,0,test,t52,id: 16,MyISAM,0,test,tmp,id: 16 +RENAME,MyISAM,0,test,t53,id: 17,MyISAM,0,test,t52,id: 17 +RENAME,MyISAM,0,test,tmp,id: 16,MyISAM,0,test,t53,id: 16 +DROP,MyISAM,0,test,t52,id: 17,,0,,, +DROP,MyISAM,0,test,t53,id: 16,,0,,, +CREATE,Aria,0,test,t60,id: 18,,0,,, +CHANGE_INDEX,Aria,0,test,t60,id: 18,,0,,, +CHANGE_INDEX,Aria,0,test,t60,id: 18,,0,,, +DROP,Aria,0,test,t60,id: 18,,0,,, +CREATE,Aria,0,test,t70,id: 19,,0,,, +BULK_INSERT,Aria,0,test,t70,id: 19,,0,,, +BULK_INSERT,Aria,0,test,t70,id: 19,,0,,, +CREATE,Aria,0,test,t71,id: 20,,0,,, +BULK_INSERT,Aria,0,test,t71,id: 20,,0,,, +DROP,Aria,0,test,t70,id: 19,,0,,, +DROP,Aria,0,test,t71,id: 20,,0,,, +CREATE,MyISAM,0,test,t@00201,id: 21,,0,,, +DROP,MyISAM,0,test,t@00201,id: 21,,0,,, +CREATE,MyISAM,0,test,t80,id: 22,,0,,, CREATE,VIEW,0,test,v1,,,0,,, CREATE,TRIGGER,0,test,trg,,,0,,, DROP,TRIGGER,0,test,trg,,,0,,, DROP,VIEW,0,test,v1,,,0,,, -DROP,MyISAM,0,test,t80,id: 23,,0,,, -CREATE,MyISAM,0,test,t85,id: 24,,0,,, -ALTER,MyISAM,0,test,t85,id: 24,InnoDB,0,test,t85,id: 25 -DROP,InnoDB,0,test,t85,id: 25,,0,,, +DROP,MyISAM,0,test,t80,id: 22,,0,,, +CREATE,MyISAM,0,test,t85,id: 23,,0,,, +ALTER,MyISAM,0,test,t85,id: 23,InnoDB,0,test,t85,id: 24 +DROP,InnoDB,0,test,t85,id: 24,,0,,, CREATE,DATABASE,0,mysqltest,,,,0,,, -CREATE,MyISAM,0,mysqltest,t90,id: 26,,0,,, -CREATE,InnoDB,0,mysqltest,t91,id: 27,,0,,, +CREATE,MyISAM,0,mysqltest,t90,id: 25,,0,,, +CREATE,InnoDB,0,mysqltest,t91,id: 26,,0,,, ALTER,DATABASE,0,mysqltest,,,,0,,, -DROP,MyISAM,0,mysqltest,t90,id: 26,,0,,, -DROP,InnoDB,0,mysqltest,t91,id: 27,,0,,, +DROP,MyISAM,0,mysqltest,t90,id: 25,,0,,, +DROP,InnoDB,0,mysqltest,t91,id: 26,,0,,, DROP,DATABASE,0,mysqltest,,,,0,,, # # Cleanup diff --git a/mysql-test/main/backup_log_print.inc b/mysql-test/main/backup_log_print.inc new file mode 100644 index 00000000000..ad46dde49f9 --- /dev/null +++ b/mysql-test/main/backup_log_print.inc @@ -0,0 +1,7 @@ +--disable_query_log +--source include/print_ddl_log.inc +--connection con1 +backup stage end; +backup stage start; +--connection default +--enable_query_log diff --git a/mysql-test/main/create_not_windows.result b/mysql-test/main/create_not_windows.result index abe76fd3fbe..1ae0f96b728 100644 --- a/mysql-test/main/create_not_windows.result +++ b/mysql-test/main/create_not_windows.result @@ -29,3 +29,39 @@ select count(a) from t1; count(a) 0 drop table t1; +# +# MDEV-25292 Atomic CREATE OR REPLACE TABLE +# +# Test multi-byte characters in table name +set names utf8; +# Filename is too long because it is converted to @274e@274e@274e@274e... +# so each '❎' is 5 bytes in filesystem, 51 x 5 = 255 bytes +create table ❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (x int); +ERROR HY000: Can't create table `test`.`❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎` (errno: 36 "File name too long") +# Let's find out max length for '❎'... +# Acceptable name length: 50; Filename length: 254 +# OK with 64-characters table name, filesystem name is 40 x 5 + 24 = 224 bytes +create table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (x int); +# Not OK with 65-characters table name +create table ttttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (x int); +ERROR 42000: Incorrect table name 'ttttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎' +show tables; +Tables_in_test +tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ +create or replace table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (y int); +show create table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎; +Table Create Table +tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ CREATE TABLE `tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎` ( + `y` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +set @@debug_dbug="+d,ddl_log_create_after_save_backup", @debug_crash_counter=1; +create or replace table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎ (z int); +ERROR HY000: Lost connection to server during query +#sql-backup-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.MYD +#sql-backup-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.MYI +#sql-backup-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.frm +#sql-create-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.MYD +#sql-create-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.MYI +#sql-create-PID-TID-tttttttttttttttttttttttt@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e@274e.frm +drop table tttttttttttttttttttttttt❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎❎; +set @@debug_dbug=""; diff --git a/mysql-test/main/create_not_windows.test b/mysql-test/main/create_not_windows.test index b612e31e3aa..d6dfc0d3fa1 100644 --- a/mysql-test/main/create_not_windows.test +++ b/mysql-test/main/create_not_windows.test @@ -1,6 +1,8 @@ # Non-windows specific create tests. --source include/not_windows.inc +--source include/have_debug.inc +--source include/not_embedded.inc # # Bug#19479:mysqldump creates invalid dump @@ -41,3 +43,64 @@ create table t1(a int, b int, c int); --echo "Try to select from the table. This should not crash the server" select count(a) from t1; drop table t1; + +--echo # +--echo # MDEV-25292 Atomic CREATE OR REPLACE TABLE +--echo # + +# This does not work on Windows because of max path limit 255 +# (actually it does not work for path 254 already) +# Note: on Windows use ER_BAD_DB_ERROR instead of ER_CANT_CREATE_TABLE +# unless MDEV-28746 is fixed. + +--echo # Test multi-byte characters in table name +set names utf8; +let $save_debug=`select @@debug_dbug`; +let $MYSQLD_DATADIR= `SELECT @@datadir`; +--echo # Filename is too long because it is converted to @274e@274e@274e@274e... +--echo # so each '❎' is 5 bytes in filesystem, 51 x 5 = 255 bytes +let $t= `select repeat('❎', 51)`; +--error ER_CANT_CREATE_TABLE +eval create table $t (x int); +# The below case is useful for experimenting on Windows +--echo # Let's find out max length for '❎'... +--disable_query_log +let $i= 50; +while ($i) +{ + let $t= `select repeat('❎', $i)`; + --error 0,ER_CANT_CREATE_TABLE + eval create table $t (x int); + let $good_len= $i; + dec $i; + if (!$mysql_errno) + { + let $i= 0; + } +} +let $fn_len= `select $good_len * 5 + 4`; # 4 is extension length +eval drop table $t; +--enable_query_log +--echo # Acceptable name length: $good_len; Filename length: $fn_len +--echo # OK with 64-characters table name, filesystem name is 40 x 5 + 24 = 224 bytes +let $t= `select concat(repeat('t', 24), repeat('❎', 40))`; +eval create table $t (x int); +--echo # Not OK with 65-characters table name +let $t2= `select concat(repeat('t', 25), repeat('❎', 40))`; +--error ER_WRONG_TABLE_NAME +eval create table $t2 (x int); +show tables; +# Let's try atomic replace with such long name and see what happens +eval create or replace table $t (y int); +eval show create table $t; +set @@debug_dbug="+d,ddl_log_create_after_save_backup", @debug_crash_counter=1; +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--disable_reconnect +--error 2013 +eval create or replace table $t (z int); +--replace_regex /-\w+-\w+-ttt/-PID-TID-ttt/ +--list_files $MYSQLD_DATADIR/test *sql* +--enable_reconnect +--source include/wait_until_connected_again.inc +eval drop table $t; +eval set @@debug_dbug="$save_debug"; diff --git a/mysql-test/main/create_or_replace.result b/mysql-test/main/create_or_replace.result index 178b7182666..46645bb910f 100644 --- a/mysql-test/main/create_or_replace.result +++ b/mysql-test/main/create_or_replace.result @@ -1,5 +1,3 @@ -SET @save_persistent=@@GLOBAL.innodb_stats_persistent; -SET GLOBAL innodb_stats_persistent=OFF; CREATE TABLE t2 (a int); INSERT INTO t2 VALUES(1),(2),(3); # @@ -260,7 +258,8 @@ Note 1051 Unknown table 'test.t1,mysqltest2.t2' create table test.t1 (i int) engine=myisam; create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock @@ -272,24 +271,37 @@ create or replace table test.t1; ERROR 42000: A table must have at least 1 column show tables; Tables_in_test +t1 t2 -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock # MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 # MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test # MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2 +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 create or replace table mysqltest2.t2; ERROR 42000: A table must have at least 1 column -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_BACKUP_DDL NULL Backup lock +# MDL_BACKUP_DML NULL Backup lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2 +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 +drop table mysqltest2.t2; +drop table t1; create table t1 (i int); drop table t1; create table test.t1 (i int); create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock @@ -301,24 +313,37 @@ create or replace table test.t1 (a int) select 1 as 'a', 2 as 'a'; ERROR 42S21: Duplicate column name 'a' show tables; Tables_in_test +t1 t2 -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock # MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 # MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test # MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2 +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 create or replace table mysqltest2.t2 (a int) select 1 as 'a', 2 as 'a'; ERROR 42S21: Duplicate column name 'a' -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_BACKUP_DDL NULL Backup lock +# MDL_BACKUP_DML NULL Backup lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2 +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 +drop table mysqltest2.t2; +drop table t1; create table t1 (i int); drop table t1; create table test.t1 (i int) engine=innodb; create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 @@ -330,7 +355,8 @@ drop table test.t1,mysqltest2.t2; create table test.t1 (i int) engine=aria transactional=1 checksum=1; create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 @@ -347,7 +373,8 @@ drop table test.t1; # create table t1 (i int); lock table t1 write; -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock @@ -355,10 +382,12 @@ THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 create or replace table t1 (a char(1)) engine=Innodb select 'foo' as a; ERROR 22001: Data too long for column 'a' at row 1 +drop table t1; show tables; Tables_in_test t2 -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME create table t1 (i int); drop table t1; @@ -446,7 +475,8 @@ drop view t1; # create table t1 (a int); lock table t1 write, t2 read; -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock @@ -454,7 +484,8 @@ THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 # MDL_SHARED_READ NULL Table metadata lock test t2 create or replace table t1 (i int); -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock @@ -462,7 +493,8 @@ THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 # MDL_SHARED_READ NULL Table metadata lock test t2 create or replace table t1 like t2; -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock @@ -470,7 +502,8 @@ THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 # MDL_SHARED_READ NULL Table metadata lock test t2 create or replace table t1 select 1 as f1; -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME # MDL_BACKUP_DDL NULL Backup lock # MDL_BACKUP_DML NULL Backup lock @@ -568,4 +601,243 @@ ERROR HY000: Table 't3' was not locked with LOCK TABLES UNLOCK TABLES; DROP TABLE t3; # End of 10.4 tests -SET GLOBAL innodb_stats_persistent=@save_persistent; +# +# MDEV-25292 Atomic CREATE OR REPLACE TABLE +# +create table t1 (a int); +insert t1 values (1), (1); +create table t2 (c int); +create or replace table t2 (a int, b int, key k (a), key k (b)); +ERROR 42000: Duplicate key name 'k' +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create or replace table t2 (a int, b int, key k (a), key k (b)) as select a, a as b from t1; +ERROR 42000: Duplicate key name 'k' +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create or replace table t2 (a int primary key) as select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +set @old_mode= @@sql_mode; +set @@sql_mode='ALLOW_INVALID_DATES'; +create table t3 (dt datetime default '2008-02-31 00:00:00'); +set @@sql_mode= @old_mode; +create or replace table t2 like t3; +ERROR 42000: Invalid default value for 'dt' +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +# LOCK TABLES +lock tables t2 write, t1 write; +flush tables; +show open tables like 't2'; +Database Table In_use Name_locked +test t2 1 0 +create or replace table t2 (y int); +flush tables; +show open tables like 't2'; +Database Table In_use Name_locked +test t2 1 0 +create or replace table t2 like t1; +flush tables; +show open tables like 't2'; +Database Table In_use Name_locked +test t2 1 0 +create or replace table t2 (y int) as select * from t1; +flush tables; +show open tables like 't2'; +Database Table In_use Name_locked +test t2 1 0 +unlock tables; +# SP +create or replace procedure sp(n int) +begin +select concat('sp call ', n, ':') as ''; +show open tables like 't2'; +create or replace table t2 (y int); +select 'create or replace table t2 (y int);' as ''; +show open tables like 't2'; +insert into t2 values (2); +select 'insert into t2 values (2);' as ''; +show open tables like 't2'; +create or replace table t2 like t1; +select 'create or replace table t2 like t1;' as ''; +show open tables like 't2'; +create or replace table t2 (y int) as select * from t1; +select 'create or replace table t2 (y int) as select * from t1;' as ''; +show open tables like 't2'; +select 'select * from t2;' as ''; +select * from t2; +show open tables like 't2'; +end $ +flush tables; +call sp(1); + +sp call 1: +Database Table In_use Name_locked + +create or replace table t2 (y int); +Database Table In_use Name_locked + +insert into t2 values (2); +Database Table In_use Name_locked +test t2 0 0 + +create or replace table t2 like t1; +Database Table In_use Name_locked + +create or replace table t2 (y int) as select * from t1; +Database Table In_use Name_locked + +select * from t2; +y a +NULL 1 +NULL 1 +Database Table In_use Name_locked +test t2 0 0 +call sp(2); + +sp call 2: +Database Table In_use Name_locked +test t2 0 0 + +create or replace table t2 (y int); +Database Table In_use Name_locked + +insert into t2 values (2); +Database Table In_use Name_locked +test t2 0 0 + +create or replace table t2 like t1; +Database Table In_use Name_locked + +create or replace table t2 (y int) as select * from t1; +Database Table In_use Name_locked + +select * from t2; +y a +NULL 1 +NULL 1 +Database Table In_use Name_locked +test t2 0 0 +# SP under LOCK TABLES +lock tables t2 write, t1 write; +call sp(3); + +sp call 3: +Database Table In_use Name_locked +test t2 1 0 + +create or replace table t2 (y int); +Database Table In_use Name_locked +test t2 1 0 + +insert into t2 values (2); +Database Table In_use Name_locked +test t2 1 0 + +create or replace table t2 like t1; +Database Table In_use Name_locked +test t2 1 0 + +create or replace table t2 (y int) as select * from t1; +Database Table In_use Name_locked +test t2 1 0 + +select * from t2; +y a +NULL 1 +NULL 1 +Database Table In_use Name_locked +test t2 1 0 +call sp(4); + +sp call 4: +Database Table In_use Name_locked +test t2 1 0 + +create or replace table t2 (y int); +Database Table In_use Name_locked +test t2 1 0 + +insert into t2 values (2); +Database Table In_use Name_locked +test t2 1 0 + +create or replace table t2 like t1; +Database Table In_use Name_locked +test t2 1 0 + +create or replace table t2 (y int) as select * from t1; +Database Table In_use Name_locked +test t2 1 0 + +select * from t2; +y a +NULL 1 +NULL 1 +Database Table In_use Name_locked +test t2 1 0 +unlock tables; +drop procedure sp; +drop tables t1, t2, t3; +# Trigger +create table t1 (a int); +create trigger a before insert on t1 for each row set @s= 1; +create or replace table t1 (old int); +show create trigger a; +ERROR HY000: Trigger does not exist +drop table t1; +# Foreign keys +create table t1 (x int primary key, y int) engine innodb; +create table t2 (x int references t1(x)) engine innodb; +create or replace table t1 (x int primary key); +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (t2) +create or replace table t1 (x int primary key); +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (t2) +create table t3 (x int); +create or replace table t1 like t3; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (t2) +create or replace table t1 like t3; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (t2) +create or replace table t1 select * from t3; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (t2) +create or replace table t1 select * from t3; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (t2) +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `x` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`x`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop tables t3, t2, t1; +# UNIQUE +create table t1 (pk int auto_increment primary key, a varchar(2300), unique (a)) engine aria; +insert into t1 (a) values ('a'), ('b'), ('c'); +create table t2 (x int); +create or replace table t2 engine aria select * from t1; +select * from t2; +pk a +1 a +2 b +3 c +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `pk` int(11) NOT NULL DEFAULT 0, + `a` varchar(2300) DEFAULT NULL +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +drop tables t2, t1; diff --git a/mysql-test/main/create_or_replace.test b/mysql-test/main/create_or_replace.test index 573e0e177c2..7d783710c17 100644 --- a/mysql-test/main/create_or_replace.test +++ b/mysql-test/main/create_or_replace.test @@ -5,8 +5,7 @@ --source include/have_innodb.inc --source include/have_metadata_lock_info.inc -SET @save_persistent=@@GLOBAL.innodb_stats_persistent; -SET GLOBAL innodb_stats_persistent=OFF; +let $MYSQLD_DATADIR= `SELECT @@datadir`; # # Create help table @@ -215,18 +214,23 @@ create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; --error ER_TABLE_MUST_HAVE_COLUMNS create or replace table test.t1; show tables; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; --error ER_TABLE_MUST_HAVE_COLUMNS create or replace table mysqltest2.t2; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; +drop table mysqltest2.t2; +drop table t1; create table t1 (i int); drop table t1; @@ -235,18 +239,23 @@ create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; --error ER_DUP_FIELDNAME create or replace table test.t1 (a int) select 1 as 'a', 2 as 'a'; show tables; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; --error ER_DUP_FIELDNAME create or replace table mysqltest2.t2 (a int) select 1 as 'a', 2 as 'a'; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; +drop table mysqltest2.t2; +drop table t1; create table t1 (i int); drop table t1; @@ -255,7 +264,8 @@ create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; unlock tables; drop table test.t1,mysqltest2.t2; @@ -264,7 +274,8 @@ create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; unlock tables; drop table t1; @@ -280,13 +291,16 @@ create table t1 (i int); lock table t1 write; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; --error ER_DATA_TOO_LONG create or replace table t1 (a char(1)) engine=Innodb select 'foo' as a; +drop table t1; show tables; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; create table t1 (i int); drop table t1; @@ -364,20 +378,24 @@ create table t1 (a int); lock table t1 write, t2 read; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; create or replace table t1 (i int); --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; create or replace table t1 like t2; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; create or replace table t1 select 1 as f1; --replace_column 1 # --sorted_result -select * from information_schema.metadata_lock_info; +select * from information_schema.metadata_lock_info +where table_schema!='mysql' or table_name not like 'innodb_%_stats'; drop table t1; unlock tables; @@ -510,4 +528,107 @@ DROP TABLE t3; --echo # End of 10.4 tests -SET GLOBAL innodb_stats_persistent=@save_persistent; +--echo # +--echo # MDEV-25292 Atomic CREATE OR REPLACE TABLE +--echo # +create table t1 (a int); +insert t1 values (1), (1); +create table t2 (c int); +--error ER_DUP_KEYNAME +create or replace table t2 (a int, b int, key k (a), key k (b)); +show create table t2; +--error ER_DUP_KEYNAME +create or replace table t2 (a int, b int, key k (a), key k (b)) as select a, a as b from t1; +show create table t2; +--error ER_DUP_ENTRY +create or replace table t2 (a int primary key) as select * from t1; +show create table t2; +set @old_mode= @@sql_mode; +set @@sql_mode='ALLOW_INVALID_DATES'; +create table t3 (dt datetime default '2008-02-31 00:00:00'); +set @@sql_mode= @old_mode; +--error ER_INVALID_DEFAULT +create or replace table t2 like t3; +show create table t2; +--echo # LOCK TABLES +lock tables t2 write, t1 write; +flush tables; +show open tables like 't2'; +create or replace table t2 (y int); +flush tables; +show open tables like 't2'; +create or replace table t2 like t1; +flush tables; +show open tables like 't2'; +create or replace table t2 (y int) as select * from t1; +flush tables; +show open tables like 't2'; +unlock tables; +--echo # SP +--delimiter $ +create or replace procedure sp(n int) +begin + select concat('sp call ', n, ':') as ''; + show open tables like 't2'; + create or replace table t2 (y int); + select 'create or replace table t2 (y int);' as ''; + show open tables like 't2'; + insert into t2 values (2); + select 'insert into t2 values (2);' as ''; + show open tables like 't2'; + create or replace table t2 like t1; + select 'create or replace table t2 like t1;' as ''; + show open tables like 't2'; + create or replace table t2 (y int) as select * from t1; + select 'create or replace table t2 (y int) as select * from t1;' as ''; + show open tables like 't2'; + select 'select * from t2;' as ''; + select * from t2; + show open tables like 't2'; +end $ +--delimiter ; +flush tables; +call sp(1); call sp(2); +--echo # SP under LOCK TABLES +lock tables t2 write, t1 write; +call sp(3); call sp(4); +unlock tables; +drop procedure sp; +drop tables t1, t2, t3; +--echo # Trigger +create table t1 (a int); +create trigger a before insert on t1 for each row set @s= 1; +create or replace table t1 (old int); +--error ER_TRG_DOES_NOT_EXIST +show create trigger a; +drop table t1; +--echo # Foreign keys +--list_files $MYSQLD_DATADIR/test *sql* +create table t1 (x int primary key, y int) engine innodb; +create table t2 (x int references t1(x)) engine innodb; +--error ER_ROW_IS_REFERENCED_2 +create or replace table t1 (x int primary key); +--list_files $MYSQLD_DATADIR/test *sql* +--error ER_ROW_IS_REFERENCED_2 +create or replace table t1 (x int primary key); +create table t3 (x int); +--error ER_ROW_IS_REFERENCED_2 +create or replace table t1 like t3; +--list_files $MYSQLD_DATADIR/test *sql* +--error ER_ROW_IS_REFERENCED_2 +create or replace table t1 like t3; +--error ER_ROW_IS_REFERENCED_2 +create or replace table t1 select * from t3; +--error ER_ROW_IS_REFERENCED_2 +create or replace table t1 select * from t3; +--list_files $MYSQLD_DATADIR/test *sql* +show create table t1; +drop tables t3, t2, t1; +--echo # UNIQUE +create table t1 (pk int auto_increment primary key, a varchar(2300), unique (a)) engine aria; +insert into t1 (a) values ('a'), ('b'), ('c'); +create table t2 (x int); +create or replace table t2 engine aria select * from t1; +select * from t2; +show create table t2; +drop tables t2, t1; diff --git a/mysql-test/main/create_or_replace2.result b/mysql-test/main/create_or_replace2.result index 6be0d46bdc1..f7bbb7417e6 100644 --- a/mysql-test/main/create_or_replace2.result +++ b/mysql-test/main/create_or_replace2.result @@ -21,7 +21,54 @@ connection slave; SHOW TABLES; Tables_in_test t1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + KEY `a` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 connection master; drop temporary table if exists tmp; drop table t1; include/rpl_end.inc +# +# MDEV-25292 Atomic CREATE OR REPLACE TABLE +# +set @saved_debug_dbug= @@session.debug_dbug; +create table t1 (a int primary key) engine innodb; +insert t1 values (1), (2); +create table t2 (c int, a int constraint t1_a references t1 (a)) engine innodb; +insert into t2 values (2, 2); +lock tables t2 write, t1 write; +set session debug_dbug= '+d,atomic_replace_external_lock_fail'; +create or replace table t2 (y int) as select * from t1; +ERROR HY000: The total number of locks exceeds the lock table size +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + KEY `t1_a` (`a`), + CONSTRAINT `t1_a` FOREIGN KEY (`a`) REFERENCES `t1` (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select * from t2; +c a +2 2 +unlock tables; +drop tables t2, t1; +set session debug_dbug= @saved_debug_dbug; +# Test entry_pos in higher position, so drop chain executes before create chain +# (see commit message: On linking two chains together) +create table t1 (c int); +create or replace table t1 (a int, b int, key k (a), key k (b)); +ERROR 42000: Duplicate key name 'k' +create or replace table t1 (a int, b int, key k (a), key k (b)); +ERROR 42000: Duplicate key name 'k' +drop table t1; diff --git a/mysql-test/main/create_or_replace2.test b/mysql-test/main/create_or_replace2.test index 80c8b635d8d..227aff226d5 100644 --- a/mysql-test/main/create_or_replace2.test +++ b/mysql-test/main/create_or_replace2.test @@ -26,6 +26,7 @@ SHOW TABLES; show create table t1; --sync_slave_with_master SHOW TABLES; +show create table t1; --connection master --disable_warnings @@ -33,3 +34,34 @@ drop temporary table if exists tmp; --enable_warnings drop table t1; --source include/rpl_end.inc + + +--echo # +--echo # MDEV-25292 Atomic CREATE OR REPLACE TABLE +--echo # +set @saved_debug_dbug= @@session.debug_dbug; +create table t1 (a int primary key) engine innodb; +insert t1 values (1), (2); +create table t2 (c int, a int constraint t1_a references t1 (a)) engine innodb; +insert into t2 values (2, 2); +lock tables t2 write, t1 write; +set session debug_dbug= '+d,atomic_replace_external_lock_fail'; +--error ER_LOCK_TABLE_FULL +create or replace table t2 (y int) as select * from t1; +let $MYSQLD_DATADIR= `SELECT @@datadir`; +--list_files $MYSQLD_DATADIR/test *sql* +show create table t1; +show create table t2; +select * from t2; +unlock tables; +drop tables t2, t1; +set session debug_dbug= @saved_debug_dbug; + +--echo # Test entry_pos in higher position, so drop chain executes before create chain +--echo # (see commit message: On linking two chains together) +create table t1 (c int); +--error ER_DUP_KEYNAME +create or replace table t1 (a int, b int, key k (a), key k (b)); +--error ER_DUP_KEYNAME +create or replace table t1 (a int, b int, key k (a), key k (b)); +drop table t1; diff --git a/mysql-test/main/default.result b/mysql-test/main/default.result index 2d94c0695a0..52851694568 100644 --- a/mysql-test/main/default.result +++ b/mysql-test/main/default.result @@ -428,14 +428,6 @@ a b c e 2 -1 1 1 drop table t1; # -# Create or replace can delete a table on error -# -create table t1 (a int); -create or replace table t1 (a int default b, b int default a); -ERROR 01000: Expression for field `a` is referring to uninitialized field `b` -show create table t1; -ERROR 42S02: Table 'test.t1' doesn't exist -# # Refering to other columns # create or replace table t1 (a int default 1, b int default a); @@ -453,11 +445,11 @@ ERROR 01000: Expression for field `a` is referring to uninitialized field `a` create or replace table t1 (a int default b, b int default (1+1)); create or replace table t1 (a int default 1, b int as (c), c int as (a+1)); ERROR 01000: Expression for field `b` is referring to uninitialized field `c` -CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a))); +CREATE OR REPLACE TABLE t1 (a INT DEFAULT (DEFAULT(a))); ERROR 01000: Expression for field `a` is referring to uninitialized field `a` -CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a))); +CREATE OR REPLACE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a))); ERROR 01000: Expression for field `a` is referring to uninitialized field `b` -CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL); +CREATE OR REPLACE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL); ERROR 01000: Expression for field `a` is referring to uninitialized field `b` # # Allow defaults to refer to not default fields diff --git a/mysql-test/main/default.test b/mysql-test/main/default.test index 26fc2186533..36a616551d7 100644 --- a/mysql-test/main/default.test +++ b/mysql-test/main/default.test @@ -308,15 +308,6 @@ select * from t1; drop table t1; --echo # ---echo # Create or replace can delete a table on error ---echo # -create table t1 (a int); ---error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD -create or replace table t1 (a int default b, b int default a); ---error ER_NO_SUCH_TABLE -show create table t1; - ---echo # --echo # Refering to other columns --echo # @@ -338,11 +329,11 @@ create or replace table t1 (a int default b, b int default (1+1)); --error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD create or replace table t1 (a int default 1, b int as (c), c int as (a+1)); --error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD -CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a))); +CREATE OR REPLACE TABLE t1 (a INT DEFAULT (DEFAULT(a))); --error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD -CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a))); +CREATE OR REPLACE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a))); --error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD -CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL); +CREATE OR REPLACE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL); --echo # --echo # Allow defaults to refer to not default fields diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index 30c6aaf0f20..19d1f462aa0 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -397,7 +397,8 @@ c d create or replace table t2 (a int, b blob, unique(b)) as select * from t1; ERROR 23000: Duplicate entry 'bar' for key 'b' select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist +c d +3 bar create or replace table t2 (a int, b blob, unique(b)) ignore as select * from t1; Warnings: Warning 1062 Duplicate entry 'bar' for key 'b' diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index 18e430858b0..e522f5140ba 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -480,7 +480,6 @@ delete from t2 using t1, t2 where t1.a=t2.c and t1.b='foo'; # CREATE...SELECT --error ER_DUP_ENTRY create or replace table t2 (a int, b blob, unique(b)) as select * from t1; ---error ER_NO_SUCH_TABLE select * from t2; create or replace table t2 (a int, b blob, unique(b)) ignore as select * from t1; select * from t2; diff --git a/mysql-test/suite/atomic/create_replace,aria_notrans,row.result b/mysql-test/suite/atomic/create_replace,aria_notrans,row.result new file mode 100644 index 00000000000..0006c405608 --- /dev/null +++ b/mysql-test/suite/atomic/create_replace,aria_notrans,row.result @@ -0,0 +1,710 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=Aria PAGE_CHECKSUM=1 TRANSACTIONAL=0 +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=Aria PAGE_CHECKSUM=1 TRANSACTIONAL=0 +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=Aria PAGE_CHECKSUM=1 TRANSACTIONAL=0 +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=Aria PAGE_CHECKSUM=1 TRANSACTIONAL=0 +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace,aria_notrans.result b/mysql-test/suite/atomic/create_replace,aria_notrans.result new file mode 100644 index 00000000000..a6ce2c40c7e --- /dev/null +++ b/mysql-test/suite/atomic/create_replace,aria_notrans.result @@ -0,0 +1,696 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) engine=aria,transactional=0 +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 engine=aria,transactional=0 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace,expensive_rename,row.result b/mysql-test/suite/atomic/create_replace,expensive_rename,row.result new file mode 100644 index 00000000000..dd8ba62643f --- /dev/null +++ b/mysql-test/suite/atomic/create_replace,expensive_rename,row.result @@ -0,0 +1,584 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) +# CRASH POINT: ddl_log_create_before_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_drop_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_rename_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_frm +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_drop +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_binlog +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_drop_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_rename_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_frm +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_drop +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_binlog +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_drop_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_rename_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_frm +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_drop +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_binlog +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_prepare_eof +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace,expensive_rename.result b/mysql-test/suite/atomic/create_replace,expensive_rename.result new file mode 100644 index 00000000000..8d64a6cd950 --- /dev/null +++ b/mysql-test/suite/atomic/create_replace,expensive_rename.result @@ -0,0 +1,561 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) +# CRASH POINT: ddl_log_create_before_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_drop_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_rename_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_frm +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_drop +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_binlog +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_drop_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_rename_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_frm +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_drop +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_binlog +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_drop_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_log_rename_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_frm +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_create_table +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_drop +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_install_new +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_before_binlog +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_prepare_eof +master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by ddl recovery */ +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace,ib,row.result b/mysql-test/suite/atomic/create_replace,ib,row.result new file mode 100644 index 00000000000..84c0ccefcd9 --- /dev/null +++ b/mysql-test/suite/atomic/create_replace,ib,row.result @@ -0,0 +1,661 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) +# CRASH POINT: ddl_log_create_before_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_save_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_binlog +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.TRG +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete2 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace,ib.result b/mysql-test/suite/atomic/create_replace,ib.result new file mode 100644 index 00000000000..18b88211e06 --- /dev/null +++ b/mysql-test/suite/atomic/create_replace,ib.result @@ -0,0 +1,648 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) +# CRASH POINT: ddl_log_create_before_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_save_backup +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +t1.TRG +t1.frm +t1.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_binlog +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.frm +t1.ibd +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace,myisam,row.result b/mysql-test/suite/atomic/create_replace,myisam,row.result new file mode 100644 index 00000000000..cf4d48c436b --- /dev/null +++ b/mysql-test/suite/atomic/create_replace,myisam,row.result @@ -0,0 +1,710 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace,row.result b/mysql-test/suite/atomic/create_replace,row.result new file mode 100644 index 00000000000..7d0a1888fc2 --- /dev/null +++ b/mysql-test/suite/atomic/create_replace,row.result @@ -0,0 +1,710 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) PAGE_CHECKSUM=1 +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) PAGE_CHECKSUM=1 +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) PAGE_CHECKSUM=1 +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) PAGE_CHECKSUM=1 +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace.combinations b/mysql-test/suite/atomic/create_replace.combinations new file mode 100644 index 00000000000..09eb352b1cd --- /dev/null +++ b/mysql-test/suite/atomic/create_replace.combinations @@ -0,0 +1,6 @@ +[ib] +[myisam] +[aria] +[aria_notrans] +[expensive_rename] +[lock_tables] diff --git a/mysql-test/suite/atomic/create_replace.result b/mysql-test/suite/atomic/create_replace.result new file mode 100644 index 00000000000..0bac8d8bb92 --- /dev/null +++ b/mysql-test/suite/atomic/create_replace.result @@ -0,0 +1,696 @@ +# Crash recovery +Table Create Table +const_table CREATE TABLE `const_table` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +insert into const_table values (1, 1), (2, 2); +flush tables; +# QUERY: CREATE OR REPLACE TABLE t1 (new int) +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (new int) +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 LIKE const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# QUERY: CREATE OR REPLACE TABLE t1 SELECT * from const_table +# CRASH POINT: ddl_log_create_before_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_drop_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_log_rename_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_frm +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_create_table +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_drop +# No crash! +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_after_send_data +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_save_backup +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_install_new +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_before_binlog +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_prepare_eof +t1.DATA1 +t1.DATA2 +t1.TRG +t1.frm +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_after_binlog +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_fk_fail +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail2 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_fk_fail3 +t1.TRG +t1.frm +t1.ibd +t2.frm +t2.ibd +Table Create Table +t1 CREATE TABLE `t1` ( + `old` int(11) NOT NULL, + `y` int(11) DEFAULT NULL, + PRIMARY KEY (`old`) +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +old y +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +a INSERT t1 set @s= 1 BEFORE +# CRASH POINT: ddl_log_create_log_complete +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete2 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +# CRASH POINT: ddl_log_create_log_complete3 +t1.DATA1 +t1.DATA2 +t1.frm +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 SELECT * from const_table +Table Create Table +t1 CREATE TABLE `t1` ( + `new` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=ENGINE DEFAULT CHARSET=latin1 +new b +1 1 +2 2 +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +Warnings: +Note 1051 Unknown table 'test.t1' diff --git a/mysql-test/suite/atomic/create_replace.test b/mysql-test/suite/atomic/create_replace.test new file mode 100644 index 00000000000..7cb6d349444 --- /dev/null +++ b/mysql-test/suite/atomic/create_replace.test @@ -0,0 +1,211 @@ +--source include/have_debug.inc +--source include/have_sequence.inc +--source include/have_innodb.inc +--source include/binlog_formats.inc +--source include/not_valgrind.inc + +--disable_query_log +let $default_engine=InnoDB; +let $extra_option= ''; +let $save_debug=`select @@debug_dbug`; +let $show_error=0; +let $drop_error=0; + +if ($MTR_COMBINATION_MYISAM) +{ + let $default_engine=MyISAM; +} +if ($MTR_COMBINATION_ARIA) +{ + let $default_engine=Aria; + call mtr.add_suppression("Checking table"); + call mtr.add_suppression("marked as crashed"); +} +if ($MTR_COMBINATION_ARIA_NOTRANS) +{ + let $default_engine=Aria; + let $extra_option=' engine=aria,transactional=0'; + call mtr.add_suppression("Checking table"); + call mtr.add_suppression("marked as crashed"); +} +if ($MTR_COMBINATION_EXPENSIVE_RENAME) +{ + # Disable atomic CREATE OR REPLACE (emulates HTON_EXPENSIVE_RENAME flag) + let $default_engine=MyISAM; + let $show_error=0, ER_NO_SUCH_TABLE; + let $drop_error=0, ER_BAD_TABLE_ERROR; + set @@debug_dbug="+d,ddl_log_expensive_rename"; +} +if ($MTR_COMBINATION_LOCK_TABLES) +{ + let $default_engine=Aria; + call mtr.add_suppression("Checking table"); + call mtr.add_suppression("marked as crashed"); +} + +if ($MTR_COMBINATION_STMT) +{ + let $binlog_format=include/set_binlog_format_statement.sql; +} +if ($MTR_COMBINATION_ROW) +{ + let $binlog_format=include/set_binlog_format_row.sql; +} +if ($MTR_COMBINATION_MIX) +{ + --skip same as stmt +} + +--eval set @@default_storage_engine=$default_engine +--enable_query_log + +--echo # Crash recovery + +let $MYSQLD_DATADIR= `SELECT @@datadir`; + +let $crash_count=19; +let $crash_points='ddl_log_create_before_install_new', + 'ddl_log_create_after_log_drop_backup', + 'ddl_log_create_after_log_rename_backup', + 'ddl_log_create_before_create_frm', + 'ddl_log_create_before_create_table', + 'ddl_log_create_after_create_table', + 'ddl_log_create_after_drop', + 'ddl_log_create_after_send_data', + 'ddl_log_create_after_save_backup', + 'ddl_log_create_after_install_new', + 'ddl_log_create_before_binlog', + 'ddl_log_create_after_prepare_eof', + 'ddl_log_create_after_binlog', + 'ddl_log_create_fk_fail', + 'ddl_log_create_fk_fail2', + 'ddl_log_create_fk_fail3', + 'ddl_log_create_log_complete', + 'ddl_log_create_log_complete2', + 'ddl_log_create_log_complete3'; + +#let $crash_count=1; +#let $crash_points='ddl_log_create_fk_fail'; +# 'ddl_log_create_before_binlog3', +# 'ddl_log_create_before_binlog4'; + +let $statement_count=3; +let $statements='CREATE OR REPLACE TABLE t1 (new int) EXTRA_OPTION', + 'CREATE OR REPLACE TABLE t1 LIKE const_table', + 'CREATE OR REPLACE TABLE t1 EXTRA_OPTION SELECT * from const_table'; + +#let $statement_count=1; +#let $statements='CREATE OR REPLACE TABLE t1 EXTRA_OPTION SELECT * from const_table'; + +--disable_query_log +let create_const=`select REPLACE('create table const_table (new int, b int) EXTRA_OPTION', ' EXTRA_OPTION', $extra_option)`; +eval $create_const; +--replace_result $default_engine ENGINE ' PAGE_CHECKSUM=1' '' ' TRANSACTIONAL=0' '' +show create table const_table; +--enable_query_log +insert into const_table values (1, 1), (2, 2); +flush tables; + +let $old_debug=`select @@debug_dbug`; + +let $keep_include_silent=1; +let $grep_script=CREATE|DROP; +--disable_query_log + +let $r=0; +while ($r < $statement_count) +{ + inc $r; + let $STATEMENT=`select REPLACE(ELT($r, $statements), ' EXTRA_OPTION', $extra_option)`; + --echo # QUERY: $STATEMENT + + let $c=0; + while ($c < $crash_count) + { + inc $c; + let $crash= `select ELT($c, $crash_points)`; + let $fk_error= `select '$crash' like 'ddl_log_create_fk_fail%'`; + + --eval set @@default_storage_engine=$default_engine + create or replace table t1 (old int); + if ($fk_error) + { + create or replace table t1 (old int primary key, y int) engine innodb; + create table t2 (x int references t1(old)) engine innodb; + } + create trigger a before insert on t1 for each row set @s= 1; + flush tables; + if ($MTR_COMBINATION_LOCK_TABLES) + { + lock tables t1 write, const_table read; + } + + --source $binlog_format + + RESET MASTER; + --echo # CRASH POINT: $crash + --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + --disable_reconnect + --eval set @@debug_dbug="+d,$crash",@debug_crash_counter=1 + let $errno=0; + --error 0,2013 + eval $STATEMENT; + let $error=$errno; + --enable_reconnect + --source include/wait_until_connected_again.inc + --disable_query_log + --eval set @@debug_dbug="$old_debug" + + if ($error == 0) + { + --echo # No crash! + if ($MTR_COMBINATION_LOCK_TABLES) + { + unlock tables; + } + } + # Check which tables still exists + --replace_result .MAD .DATA1 .MYD .DATA1 .MAI .DATA2 .MYI .DATA2 + --list_files $MYSQLD_DATADIR/test t* + --list_files $MYSQLD_DATADIR/test *sql* + + --let $binlog_file=master-bin.000001 + --source include/show_binlog_events.inc + if ($error) + { + --let $binlog_file=master-bin.000002 + --source include/show_binlog_events.inc + } + + if ($default_engine == Aria) + { + # Again we suppress 'marked as crashed', it works differently in --ps + --disable_warnings + } + --replace_result $default_engine ENGINE InnoDB ENGINE ' PAGE_CHECKSUM=1' '' ' TRANSACTIONAL=0' '' + --error $show_error + show create table t1; + --enable_warnings + if (`select locate('SELECT', '$STATEMENT')`) + { + --error $show_error + select * from t1; + } + --enable_warnings + --replace_column 6 '' 7 '' 8 '' 9 '' 10 '' 11 '' + show triggers; + # Drop the tables. The warnings will show what was dropped + if ($fk_error) + { + drop table t2; + } + --disable_warnings + --error $drop_error + drop table t1; + --enable_warnings + } +} +drop table if exists t1,const_table; +--eval set @@debug_dbug="$save_debug" + +--enable_query_log diff --git a/mysql-test/suite/atomic/create_table.result b/mysql-test/suite/atomic/create_table.result index acc78c76d25..aa22e3cb0ed 100644 --- a/mysql-test/suite/atomic/create_table.result +++ b/mysql-test/suite/atomic/create_table.result @@ -55,7 +55,6 @@ t2.MYI t2.frm master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int) crash point: ddl_log_create_log_complete -"No crash!" t1.MYD t1.MYI t1.frm @@ -63,40 +62,6 @@ t2.MYD t2.MYI t2.frm master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int) -query: CREATE OR REPLACE TABLE t2 (a int) -crash point: ddl_log_create_before_create_frm -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: storage_engine_middle_of_create -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 (a int) -crash point: ddl_log_create_before_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_drop -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_before_binlog -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_prepare_eof -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 (a int) -crash point: ddl_log_create_after_binlog -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 (a int) -crash point: ddl_log_create_log_complete -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 (a int) query: CREATE TABLE t1 LIKE const_table crash point: ddl_log_create_before_create_frm t2.MYD @@ -150,7 +115,6 @@ t2.MYI t2.frm master-bin.000001 # Query # # use `test`; CREATE TABLE t1 LIKE const_table crash point: ddl_log_create_log_complete -"No crash!" t1.MYD t1.MYI t1.frm @@ -158,40 +122,6 @@ t2.MYD t2.MYI t2.frm master-bin.000001 # Query # # use `test`; CREATE TABLE t1 LIKE const_table -query: CREATE OR REPLACE TABLE t2 LIKE const_table -crash point: ddl_log_create_before_create_frm -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: storage_engine_middle_of_create -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 LIKE const_table -crash point: ddl_log_create_before_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_drop -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_before_binlog -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_prepare_eof -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 LIKE const_table -crash point: ddl_log_create_after_binlog -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 LIKE const_table -crash point: ddl_log_create_log_complete -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 LIKE const_table query: CREATE TABLE t1 SELECT * from t2 crash point: ddl_log_create_before_create_frm t2.MYD @@ -238,16 +168,9 @@ t2.MYD t2.MYI t2.frm crash point: ddl_log_create_after_binlog -t1.MYD -t1.MYI -t1.frm t2.MYD t2.MYI t2.frm -master-bin.000001 # Query # # use `test`; CREATE TABLE `t1` ( - `seq` bigint(20) unsigned NOT NULL -) -master-bin.000001 # Annotate_rows # # CREATE TABLE t1 SELECT * from t2 crash point: ddl_log_create_log_complete t1.MYD t1.MYI @@ -259,47 +182,6 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `t1` ( `seq` bigint(20) unsigned NOT NULL ) master-bin.000001 # Annotate_rows # # CREATE TABLE t1 SELECT * from t2 -query: CREATE OR REPLACE TABLE t2 SELECT * from const_table -crash point: ddl_log_create_before_create_frm -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: storage_engine_middle_of_create -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) -master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t2 SELECT * from const_table -crash point: ddl_log_create_before_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_drop -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_before_binlog -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_prepare_eof -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_binlog -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) -master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t2 SELECT * from const_table -crash point: ddl_log_create_log_complete -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) -master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t2 SELECT * from const_table engine: innodb query: CREATE TABLE t1 (a int) crash point: ddl_log_create_before_create_frm @@ -342,42 +224,11 @@ t2.frm t2.ibd master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int) crash point: ddl_log_create_log_complete -"No crash!" t1.frm t1.ibd t2.frm t2.ibd master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int) -query: CREATE OR REPLACE TABLE t2 (a int) -crash point: ddl_log_create_before_create_frm -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: storage_engine_middle_of_create -"No crash!" -t2.frm -t2.ibd -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 (a int) -crash point: ddl_log_create_before_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_drop -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_before_binlog -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_prepare_eof -"No crash!" -t2.frm -t2.ibd -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 (a int) -crash point: ddl_log_create_after_binlog -t2.frm -t2.ibd -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 (a int) -crash point: ddl_log_create_log_complete -"No crash!" -t2.frm -t2.ibd -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 (a int) query: CREATE TABLE t1 LIKE const_table crash point: ddl_log_create_before_create_frm t2.frm @@ -423,47 +274,12 @@ t2.frm t2.ibd master-bin.000001 # Query # # use `test`; CREATE TABLE t1 LIKE const_table crash point: ddl_log_create_log_complete -"No crash!" t1.MYD t1.MYI t1.frm t2.frm t2.ibd master-bin.000001 # Query # # use `test`; CREATE TABLE t1 LIKE const_table -query: CREATE OR REPLACE TABLE t2 LIKE const_table -crash point: ddl_log_create_before_create_frm -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: storage_engine_middle_of_create -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 LIKE const_table -crash point: ddl_log_create_before_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_drop -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_before_binlog -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_prepare_eof -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 LIKE const_table -crash point: ddl_log_create_after_binlog -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 LIKE const_table -crash point: ddl_log_create_log_complete -"No crash!" -t2.MYD -t2.MYI -t2.frm -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 LIKE const_table query: CREATE TABLE t1 SELECT * from t2 crash point: ddl_log_create_before_create_frm t2.frm @@ -494,44 +310,17 @@ t2.ibd crash point: ddl_log_create_after_prepare_eof t2.frm t2.ibd -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 SELECT * from t2 -master-bin.000002 # Query # # DROP TABLE IF EXISTS `test`.`t1` /* generated by ddl recovery */ crash point: ddl_log_create_after_binlog +t1.frm +t1.ibd t2.frm t2.ibd master-bin.000001 # Query # # use `test`; CREATE TABLE t1 SELECT * from t2 -master-bin.000002 # Query # # DROP TABLE IF EXISTS `test`.`t1` /* generated by ddl recovery */ crash point: ddl_log_create_log_complete t1.frm t1.ibd t2.frm t2.ibd master-bin.000001 # Query # # use `test`; CREATE TABLE t1 SELECT * from t2 -query: CREATE OR REPLACE TABLE t2 SELECT * from const_table -crash point: ddl_log_create_before_create_frm -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: storage_engine_middle_of_create -"No crash!" -t2.frm -t2.ibd -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 SELECT * from const_table -crash point: ddl_log_create_before_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_create_table -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_drop -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_before_binlog -master-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_prepare_eof -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 SELECT * from const_table -master-bin.000002 # Query # # DROP TABLE IF EXISTS `test`.`t2` /* generated by ddl recovery */ -crash point: ddl_log_create_after_binlog -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 SELECT * from const_table -master-bin.000002 # Query # # DROP TABLE IF EXISTS `test`.`t2` /* generated by ddl recovery */ -crash point: ddl_log_create_log_complete -t2.frm -t2.ibd -master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t2 SELECT * from const_table Warnings: Note 1051 Unknown table 'test.t1,test.t2' diff --git a/mysql-test/suite/atomic/create_table.test b/mysql-test/suite/atomic/create_table.test index ff53a12ebab..d2b63de877d 100644 --- a/mysql-test/suite/atomic/create_table.test +++ b/mysql-test/suite/atomic/create_table.test @@ -30,13 +30,10 @@ if ($engine_count == "") let $crash_count=9; let $crash_points='ddl_log_create_before_create_frm', 'storage_engine_middle_of_create', 'ddl_log_create_before_create_table', 'ddl_log_create_after_create_table', 'ddl_log_create_after_drop', 'ddl_log_create_before_binlog', 'ddl_log_create_after_prepare_eof', 'ddl_log_create_after_binlog', 'ddl_log_create_log_complete'; -let $statement_count=6; +let $statement_count=3; let $statements='CREATE TABLE t1 (a int)', - 'CREATE OR REPLACE TABLE t2 (a int)', 'CREATE TABLE t1 LIKE const_table', - 'CREATE OR REPLACE TABLE t2 LIKE const_table', - 'CREATE TABLE t1 SELECT * from t2', - 'CREATE OR REPLACE TABLE t2 SELECT * from const_table'; + 'CREATE TABLE t1 SELECT * from t2'; create table const_table (a int, b int) engine=myisam; insert into const_table values (1,1),(2,2); @@ -54,6 +51,8 @@ while ($e < $engine_count) inc $e; let $engine=`select ELT($e, $engines)`; let $default_engine=$engine; + # Note: $extra_option is not used. This dead code here is for conformity with + # other tests. let $extra_option=; if ($engine == "aria") diff --git a/mysql-test/suite/binlog/include/binlog.test b/mysql-test/suite/binlog/include/binlog.test index 9f3288b52f0..1061cf51018 100644 --- a/mysql-test/suite/binlog/include/binlog.test +++ b/mysql-test/suite/binlog/include/binlog.test @@ -419,6 +419,7 @@ create table t (old_table_field int); create or replace table t as select 1 as b, 2 as b; --error ER_DUP_FIELDNAME create or replace temporary table t as select 1 as b, 2 as b; +drop table t; create table t (new_table_field int); --source include/show_binlog_events.inc diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index fa111106cd6..c0e4e6f46be 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -1085,14 +1085,14 @@ create or replace table t as select 1 as b, 2 as b; ERROR 42S21: Duplicate column name 'b' create or replace temporary table t as select 1 as b, 2 as b; ERROR 42S21: Duplicate column name 'b' +drop table t; create table t (new_table_field int); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t (old_table_field int) -master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */ -master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE `t` /* generated by server */ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t (new_table_field int) drop table t; diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index f48b624ec21..dc0b3c2b4a1 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -682,15 +682,16 @@ create or replace table t as select 1 as b, 2 as b; ERROR 42S21: Duplicate column name 'b' create or replace temporary table t as select 1 as b, 2 as b; ERROR 42S21: Duplicate column name 'b' +drop table t; create table t (new_table_field int); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t (old_table_field int) master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */ -master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */ master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE `t` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t (new_table_field int) drop table t; diff --git a/mysql-test/suite/binlog/r/binlog_write_error.result b/mysql-test/suite/binlog/r/binlog_write_error.result index 46a233718d9..eb83a1805e6 100644 --- a/mysql-test/suite/binlog/r/binlog_write_error.result +++ b/mysql-test/suite/binlog/r/binlog_write_error.result @@ -9,6 +9,8 @@ CREATE TABLE t1 (a INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) set @@global.debug_dbug = @saved_dbug; INSERT INTO t1 VALUES (1),(2),(3); +ERROR 42S02: Table 'test.t1' doesn't exist +CREATE TABLE t1 (a INT); set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; INSERT INTO t1 VALUES (4),(5),(6); diff --git a/mysql-test/suite/binlog/t/binlog_write_error.test b/mysql-test/suite/binlog/t/binlog_write_error.test index bd1cb5301b3..f62d1f1fd49 100644 --- a/mysql-test/suite/binlog/t/binlog_write_error.test +++ b/mysql-test/suite/binlog/t/binlog_write_error.test @@ -30,8 +30,11 @@ call mtr.add_suppression("Write to binary log failed: Error writing file*"); let $query= CREATE TABLE t1 (a INT); source include/binlog_inject_error.inc; +--error ER_NO_SUCH_TABLE INSERT INTO t1 VALUES (1),(2),(3); +CREATE TABLE t1 (a INT); + let $query= INSERT INTO t1 VALUES (4),(5),(6); source include/binlog_inject_error.inc; diff --git a/mysql-test/suite/binlog_encryption/binlog_write_error.result b/mysql-test/suite/binlog_encryption/binlog_write_error.result index 46a233718d9..eb83a1805e6 100644 --- a/mysql-test/suite/binlog_encryption/binlog_write_error.result +++ b/mysql-test/suite/binlog_encryption/binlog_write_error.result @@ -9,6 +9,8 @@ CREATE TABLE t1 (a INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) set @@global.debug_dbug = @saved_dbug; INSERT INTO t1 VALUES (1),(2),(3); +ERROR 42S02: Table 'test.t1' doesn't exist +CREATE TABLE t1 (a INT); set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; INSERT INTO t1 VALUES (4),(5),(6); diff --git a/mysql-test/suite/parts/r/backup_log.result b/mysql-test/suite/parts/r/backup_log.result index 3a220491027..9b745eb8fa0 100644 --- a/mysql-test/suite/parts/r/backup_log.result +++ b/mysql-test/suite/parts/r/backup_log.result @@ -67,7 +67,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY' create table t32 (a int) PARTITION BY HASH(a) PARTITIONS 2; drop table if exists t30,t31,t32,tmp_t30; Warnings: -Note 1051 Unknown table 'test.t31,test.tmp_t30' +Note 1051 Unknown table 'test.tmp_t30' # # Testing create LIKE # @@ -208,70 +208,69 @@ CREATE,MyISAM,1,test,t30,id: 8,,0,,, CREATE,MyISAM,1,test,t31,id: 9,,0,,, DROP,MyISAM,1,test,t31,id: 9,,0,,, CREATE,MyISAM,0,test,t31,id: 10,,0,,, -DROP,MyISAM,0,test,t31,id: 10,,0,,, -DROP_AFTER_CREATE,MyISAM,1,test,t31,id: 11,,0,,, -CREATE,MyISAM,1,test,t32,id: 12,,0,,, +CREATE,MyISAM,1,test,t32,id: 11,,0,,, DROP,MyISAM,1,test,t30,id: 8,,0,,, -DROP,MyISAM,1,test,t32,id: 12,,0,,, -CREATE,MyISAM,1,test,t40,id: 13,,0,,, -CREATE,InnoDB,1,test,t41,id: 14,,0,,, +DROP,MyISAM,0,test,t31,id: 10,,0,,, +DROP,MyISAM,1,test,t32,id: 11,,0,,, +CREATE,MyISAM,1,test,t40,id: 12,,0,,, +CREATE,InnoDB,1,test,t41,id: 13,,0,,, +CREATE,partition,0,test,t42,id: 14,,0,,, +DROP,MyISAM,1,test,t42,id: 14,,0,,, CREATE,partition,0,test,t42,id: 15,,0,,, -DROP,MyISAM,1,test,t42,id: 15,,0,,, -CREATE,partition,0,test,t42,id: 16,,0,,, -DROP,MyISAM,1,test,t40,id: 13,,0,,, -DROP,InnoDB,1,test,t41,id: 14,,0,,, -DROP,InnoDB,1,test,t42,id: 16,,0,,, -CREATE,MyISAM,1,test,t50,id: 17,,0,,, -CREATE,MyISAM,1,test,t51,id: 18,,0,,, -RENAME,MyISAM,1,test,t50,id: 17,MyISAM,1,test,t52,id: 17 -RENAME,MyISAM,1,test,t51,id: 18,MyISAM,1,test,t53,id: 18 -RENAME,MyISAM,1,test,t52,id: 17,MyISAM,1,test,tmp,id: 17 -RENAME,MyISAM,1,test,t53,id: 18,MyISAM,1,test,t52,id: 18 -RENAME,MyISAM,1,test,tmp,id: 17,MyISAM,1,test,t53,id: 17 -DROP,MyISAM,1,test,t52,id: 18,,0,,, -DROP,MyISAM,1,test,t53,id: 17,,0,,, -CREATE,Aria,1,test,t60,id: 19,,0,,, -CHANGE_INDEX,Aria,1,test,t60,id: 19,,0,,, -CHANGE_INDEX,Aria,1,test,t60,id: 19,,0,,, -DROP,Aria,1,test,t60,id: 19,,0,,, -CREATE,Aria,1,test,t70,id: 20,,0,,, -BULK_INSERT,Aria,1,test,t70,id: 20,,0,,, -BULK_INSERT,Aria,1,test,t70,id: 20,,0,,, -TRUNCATE,Aria,1,test,t70,id: 20,,0,,, -BULK_INSERT,Aria,1,test,t70,id: 20,,0,,, -BULK_INSERT,Aria,1,test,t70,id: 20,,0,,, -CREATE,Aria,1,test,t71,id: 21,,0,,, -BULK_INSERT,Aria,1,test,t71,id: 21,,0,,, -BULK_INSERT,Aria,1,test,t71,id: 21,,0,,, -DROP,Aria,1,test,t70,id: 20,,0,,, -DROP,Aria,1,test,t71,id: 21,,0,,, -CREATE,MyISAM,1,test,t@00201,id: 22,,0,,, -DROP,MyISAM,1,test,t@00201,id: 22,,0,,, -CREATE,MyISAM,1,test,t80,id: 23,,0,,, +DROP,MyISAM,1,test,t40,id: 12,,0,,, +DROP,InnoDB,1,test,t41,id: 13,,0,,, +DROP,InnoDB,1,test,t42,id: 15,,0,,, +CREATE,MyISAM,1,test,t50,id: 16,,0,,, +CREATE,MyISAM,1,test,t51,id: 17,,0,,, +RENAME,MyISAM,1,test,t50,id: 16,MyISAM,1,test,t52,id: 16 +RENAME,MyISAM,1,test,t51,id: 17,MyISAM,1,test,t53,id: 17 +RENAME,MyISAM,1,test,t52,id: 16,MyISAM,1,test,tmp,id: 16 +RENAME,MyISAM,1,test,t53,id: 17,MyISAM,1,test,t52,id: 17 +RENAME,MyISAM,1,test,tmp,id: 16,MyISAM,1,test,t53,id: 16 +DROP,MyISAM,1,test,t52,id: 17,,0,,, +DROP,MyISAM,1,test,t53,id: 16,,0,,, +CREATE,Aria,1,test,t60,id: 18,,0,,, +CHANGE_INDEX,Aria,1,test,t60,id: 18,,0,,, +CHANGE_INDEX,Aria,1,test,t60,id: 18,,0,,, +DROP,Aria,1,test,t60,id: 18,,0,,, +CREATE,Aria,1,test,t70,id: 19,,0,,, +BULK_INSERT,Aria,1,test,t70,id: 19,,0,,, +BULK_INSERT,Aria,1,test,t70,id: 19,,0,,, +TRUNCATE,Aria,1,test,t70,id: 19,,0,,, +BULK_INSERT,Aria,1,test,t70,id: 19,,0,,, +BULK_INSERT,Aria,1,test,t70,id: 19,,0,,, +CREATE,Aria,1,test,t71,id: 20,,0,,, +BULK_INSERT,Aria,1,test,t71,id: 20,,0,,, +BULK_INSERT,Aria,1,test,t71,id: 20,,0,,, +DROP,Aria,1,test,t70,id: 19,,0,,, +DROP,Aria,1,test,t71,id: 20,,0,,, +CREATE,MyISAM,1,test,t@00201,id: 21,,0,,, +DROP,MyISAM,1,test,t@00201,id: 21,,0,,, +CREATE,MyISAM,1,test,t80,id: 22,,0,,, CREATE,VIEW,0,test,v1,,,0,,, CREATE,TRIGGER,0,test,trg,,,0,,, DROP,TRIGGER,0,test,trg,,,0,,, DROP,VIEW,0,test,v1,,,0,,, -DROP,MyISAM,1,test,t80,id: 23,,0,,, -CREATE,MyISAM,1,test,t85,id: 24,,0,,, -ALTER,MyISAM,1,test,t85,id: 24,InnoDB,1,test,t85,id: 25 -DROP,InnoDB,1,test,t85,id: 25,,0,,, -CREATE,Aria,0,test,t200,id: 26,,0,,, -ALTER,Aria,0,test,t200,id: 26,Aria,1,test,t200,id: 27 -CREATE,Aria,0,test,t210,id: 28,,0,,, -EXCHANGE_PARTITION,Aria,1,test,t200,id: 27,Aria,0,test,t210,id: 28 -ALTER,Aria,1,test,t200,id: 27,Aria,1,test,t200,id: 29 +DROP,MyISAM,1,test,t80,id: 22,,0,,, +CREATE,MyISAM,1,test,t85,id: 23,,0,,, +ALTER,MyISAM,1,test,t85,id: 23,InnoDB,1,test,t85,id: 24 +DROP,InnoDB,1,test,t85,id: 24,,0,,, +CREATE,Aria,0,test,t200,id: 25,,0,,, +ALTER,Aria,0,test,t200,id: 25,Aria,1,test,t200,id: 26 +CREATE,Aria,0,test,t210,id: 27,,0,,, +EXCHANGE_PARTITION,Aria,1,test,t200,id: 26,Aria,0,test,t210,id: 27 +ALTER,Aria,1,test,t200,id: 26,Aria,1,test,t200,id: 28 +ALTER,Aria,1,test,t200,id: 28,Aria,1,test,t200,id: 29 ALTER,Aria,1,test,t200,id: 29,Aria,1,test,t200,id: 30 ALTER,Aria,1,test,t200,id: 30,Aria,1,test,t200,id: 31 ALTER,Aria,1,test,t200,id: 31,Aria,1,test,t200,id: 32 ALTER,Aria,1,test,t200,id: 32,Aria,1,test,t200,id: 33 ALTER,Aria,1,test,t200,id: 33,Aria,1,test,t200,id: 34 -ALTER,Aria,1,test,t200,id: 34,Aria,1,test,t200,id: 35 -ALTER,Aria,1,test,t200,id: 35,Aria,0,test,t200,id: 36 -DROP,Aria,0,test,t200,id: 36,,0,,, -DROP,Aria,0,test,t210,id: 28,,0,,, -CREATE,Aria,1,test,t220,id: 37,,0,,, -DROP,Aria,1,test,t220,id: 37,,0,,, +ALTER,Aria,1,test,t200,id: 34,Aria,0,test,t200,id: 35 +DROP,Aria,0,test,t200,id: 35,,0,,, +DROP,Aria,0,test,t210,id: 27,,0,,, +CREATE,Aria,1,test,t220,id: 36,,0,,, +DROP,Aria,1,test,t220,id: 36,,0,,, # # Cleanup # diff --git a/mysql-test/suite/rpl/r/create_or_replace2,stmt.rdiff b/mysql-test/suite/rpl/r/create_or_replace2,stmt.rdiff new file mode 100644 index 00000000000..52dd3828b38 --- /dev/null +++ b/mysql-test/suite/rpl/r/create_or_replace2,stmt.rdiff @@ -0,0 +1,17 @@ +--- create_or_replace2.result ++++ create_or_replace2,stmt.reject +@@ -34,9 +34,11 @@ + master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) + RETURN ( SELECT MAX(a) FROM t1 ) + master-bin.000001 # Gtid # # GTID #-#-# +-master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( +- `b` int(11) DEFAULT NULL +-) ENGINE=InnoDB ++master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp (b INT) ENGINE=InnoDB ++master-bin.000001 # Gtid # # GTID #-#-# ++master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 LIKE tmp ++master-bin.000001 # Gtid # # GTID #-#-# ++master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `tmp` + drop function f1; + drop table t1; + include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/create_or_replace2.result b/mysql-test/suite/rpl/r/create_or_replace2.result index b96a0f8ae13..a179c261281 100644 --- a/mysql-test/suite/rpl/r/create_or_replace2.result +++ b/mysql-test/suite/rpl/r/create_or_replace2.result @@ -26,6 +26,17 @@ unlock tables; connection default; ERROR 42S22: Unknown column 'a' in 'field list' disconnect con1; +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) ENGINE=InnoDB +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +RETURN ( SELECT MAX(a) FROM t1 ) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB drop function f1; drop table t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/create_or_replace_mix.result b/mysql-test/suite/rpl/r/create_or_replace_mix.result index 9036ab425ae..75f7ca2a828 100644 --- a/mysql-test/suite/rpl/r/create_or_replace_mix.result +++ b/mysql-test/suite/rpl/r/create_or_replace_mix.result @@ -64,13 +64,12 @@ create table t1 (a int); create or replace table t1; ERROR 42000: A table must have at least 1 column drop table if exists t1; -Warnings: -Note 1051 Unknown table 'test.t1' -create or replace table t1 (a int primary key) select a from t2; +create or replace table t1 (b int primary key) select a as b from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -create table t1 (a int); -create or replace table t1 (a int primary key) select a from t2; +create table t1 (c int); +create or replace table t1 (d int primary key) select a as d from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +drop table t1; create temporary table t9 (a int); create or replace temporary table t9 (a int primary key) select a from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' @@ -80,34 +79,26 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create or replace table t1 -master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Query # # use `test`; create table t1 (c int) master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t1`/* Generated to handle failed CREATE OR REPLACE */ +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create temporary table t9 (a int) -master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t9`/* Generated to handle failed CREATE OR REPLACE */ connection server_2; show tables; Tables_in_test t2 connection server_1; -create table t1 (a int); +create table t1 (e int); create or replace table t1 (a int, a int) select * from t2; ERROR 42S21: Duplicate column name 'a' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t1`/* Generated to handle failed CREATE OR REPLACE */ +master-bin.000001 # Query # # use `test`; create table t1 (e int) drop table if exists t1,t2; -Warnings: -Note 1051 Unknown table 'test.t1' drop temporary table if exists t9; Warnings: Note 1051 Unknown table 'test.t9' @@ -159,7 +150,7 @@ slave-bin.000001 # Query # # use `test`; create table t4 (server_2_to_be_delete slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1 (new_table int) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# -slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( +slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) slave-bin.000001 # Annotate_rows # # create table t2 select * from t9 @@ -217,7 +208,7 @@ drop table t1; # connection server_2; connection server_1; -create table t1 (a int); +create table t1 (f int); insert into t1 values (0),(1),(2); create table t2 engine=myisam select * from t1; create or replace table t2 engine=innodb select * from t1; @@ -226,7 +217,7 @@ binlog from server 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# -slave-bin.000001 # Query # # use `test`; create table t1 (a int) +slave-bin.000001 # Query # # use `test`; create table t1 (f int) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; insert into t1 values (0),(1),(2) slave-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/create_or_replace_row.result b/mysql-test/suite/rpl/r/create_or_replace_row.result index 16f92b5e4b6..9b3ffb6777e 100644 --- a/mysql-test/suite/rpl/r/create_or_replace_row.result +++ b/mysql-test/suite/rpl/r/create_or_replace_row.result @@ -92,13 +92,12 @@ create table t1 (a int); create or replace table t1; ERROR 42000: A table must have at least 1 column drop table if exists t1; -Warnings: -Note 1051 Unknown table 'test.t1' -create or replace table t1 (a int primary key) select a from t2; +create or replace table t1 (b int primary key) select a as b from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -create table t1 (a int); -create or replace table t1 (a int primary key) select a from t2; +create table t1 (c int); +create or replace table t1 (d int primary key) select a as d from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +drop table t1; create temporary table t9 (a int); create or replace temporary table t9 (a int primary key) select a from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' @@ -108,32 +107,24 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create or replace table t1 -master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t1`/* Generated to handle failed CREATE OR REPLACE */ -master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # use `test`; create table t1 (c int) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ connection server_2; show tables; Tables_in_test t2 connection server_1; -create table t1 (a int); +create table t1 (e int); create or replace table t1 (a int, a int) select * from t2; ERROR 42S21: Duplicate column name 'a' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t1`/* Generated to handle failed CREATE OR REPLACE */ -master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # use `test`; create table t1 (e int) drop table if exists t1,t2; -Warnings: -Note 1051 Unknown table 'test.t1' drop temporary table if exists t9; Warnings: Note 1051 Unknown table 'test.t9' @@ -243,7 +234,7 @@ drop table t1; # connection server_2; connection server_1; -create table t1 (a int); +create table t1 (f int); insert into t1 values (0),(1),(2); create table t2 engine=myisam select * from t1; create or replace table t2 engine=innodb select * from t1; @@ -252,7 +243,7 @@ binlog from server 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# -slave-bin.000001 # Query # # use `test`; create table t1 (a int) +slave-bin.000001 # Query # # use `test`; create table t1 (f int) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Annotate_rows # # insert into t1 values (0),(1),(2) slave-bin.000001 # Table_map # # table_id: # (test.t1) @@ -260,7 +251,7 @@ slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( - `a` int(11) DEFAULT NULL + `f` int(11) DEFAULT NULL ) ENGINE=MyISAM slave-bin.000001 # Annotate_rows # # create table t2 engine=myisam select * from t1 slave-bin.000001 # Table_map # # table_id: # (test.t2) @@ -268,7 +259,7 @@ slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( - `a` int(11) DEFAULT NULL + `f` int(11) DEFAULT NULL ) ENGINE=InnoDB slave-bin.000001 # Annotate_rows # # create or replace table t2 engine=innodb select * from t1 slave-bin.000001 # Table_map # # table_id: # (test.t2) diff --git a/mysql-test/suite/rpl/r/create_or_replace_statement.result b/mysql-test/suite/rpl/r/create_or_replace_statement.result index 9036ab425ae..75f7ca2a828 100644 --- a/mysql-test/suite/rpl/r/create_or_replace_statement.result +++ b/mysql-test/suite/rpl/r/create_or_replace_statement.result @@ -64,13 +64,12 @@ create table t1 (a int); create or replace table t1; ERROR 42000: A table must have at least 1 column drop table if exists t1; -Warnings: -Note 1051 Unknown table 'test.t1' -create or replace table t1 (a int primary key) select a from t2; +create or replace table t1 (b int primary key) select a as b from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -create table t1 (a int); -create or replace table t1 (a int primary key) select a from t2; +create table t1 (c int); +create or replace table t1 (d int primary key) select a as d from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +drop table t1; create temporary table t9 (a int); create or replace temporary table t9 (a int primary key) select a from t2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' @@ -80,34 +79,26 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create or replace table t1 -master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Query # # use `test`; create table t1 (c int) master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t1`/* Generated to handle failed CREATE OR REPLACE */ +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create temporary table t9 (a int) -master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t9`/* Generated to handle failed CREATE OR REPLACE */ connection server_2; show tables; Tables_in_test t2 connection server_1; -create table t1 (a int); +create table t1 (e int); create or replace table t1 (a int, a int) select * from t2; ERROR 42S21: Duplicate column name 'a' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t1`/* Generated to handle failed CREATE OR REPLACE */ +master-bin.000001 # Query # # use `test`; create table t1 (e int) drop table if exists t1,t2; -Warnings: -Note 1051 Unknown table 'test.t1' drop temporary table if exists t9; Warnings: Note 1051 Unknown table 'test.t9' @@ -159,7 +150,7 @@ slave-bin.000001 # Query # # use `test`; create table t4 (server_2_to_be_delete slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1 (new_table int) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# -slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( +slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) slave-bin.000001 # Annotate_rows # # create table t2 select * from t9 @@ -217,7 +208,7 @@ drop table t1; # connection server_2; connection server_1; -create table t1 (a int); +create table t1 (f int); insert into t1 values (0),(1),(2); create table t2 engine=myisam select * from t1; create or replace table t2 engine=innodb select * from t1; @@ -226,7 +217,7 @@ binlog from server 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# -slave-bin.000001 # Query # # use `test`; create table t1 (a int) +slave-bin.000001 # Query # # use `test`; create table t1 (f int) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; insert into t1 values (0),(1),(2) slave-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_gtid_strict.result b/mysql-test/suite/rpl/r/rpl_gtid_strict.result index 27e7d105125..8cbc917a1a8 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_strict.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_strict.result @@ -59,7 +59,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4) master-bin.000001 # Xid # # COMMIT /* XID */ -*** Test non-transactional GTID error (cannot be rolled back). *** +*** Test non-transactional GTID error. *** SET server_id= 3; SET gtid_seq_no= 1; ERROR HY000: An attempt was made to binlog GTID 0-3-1 which would create an out-of-order sequence number with existing GTID 0-1-4, and gtid strict mode is enabled @@ -68,9 +68,6 @@ SET gtid_seq_no= 1; SET SESSION debug_dbug=@old_dbug; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=MyISAM; ERROR HY000: An attempt was made to binlog GTID 0-3-1 which would create an out-of-order sequence number with existing GTID 0-1-4, and gtid strict mode is enabled -SET sql_log_bin= 0; -DROP TABLE t2; -SET sql_log_bin= 1; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=MyISAM; SET gtid_seq_no= 1; ERROR HY000: An attempt was made to binlog GTID 0-3-1 which would create an out-of-order sequence number with existing GTID 0-3-5, and gtid strict mode is enabled diff --git a/mysql-test/suite/rpl/t/create_or_replace.inc b/mysql-test/suite/rpl/t/create_or_replace.inc index df46cc36e97..bdde953f7dc 100644 --- a/mysql-test/suite/rpl/t/create_or_replace.inc +++ b/mysql-test/suite/rpl/t/create_or_replace.inc @@ -47,12 +47,13 @@ create or replace table t1; drop table if exists t1; # The following is not logged as t1 does not exists; --error ER_DUP_ENTRY -create or replace table t1 (a int primary key) select a from t2; +create or replace table t1 (b int primary key) select a as b from t2; -create table t1 (a int); +create table t1 (c int); # This should as a delete as we will delete t1 --error ER_DUP_ENTRY -create or replace table t1 (a int primary key) select a from t2; +create or replace table t1 (d int primary key) select a as d from t2; +drop table t1; # Same with temporary table create temporary table t9 (a int); @@ -69,7 +70,7 @@ show tables; connection server_1; --let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1) -create table t1 (a int); +create table t1 (e int); --error ER_DUP_FIELDNAME create or replace table t1 (a int, a int) select * from t2; --source include/show_binlog_events.inc @@ -169,7 +170,7 @@ sync_with_master; --let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1) connection server_1; -create table t1 (a int); +create table t1 (f int); insert into t1 values (0),(1),(2); create table t2 engine=myisam select * from t1; create or replace table t2 engine=innodb select * from t1; diff --git a/mysql-test/suite/rpl/t/create_or_replace2.test b/mysql-test/suite/rpl/t/create_or_replace2.test index f0091db7fb9..0208be577a7 100644 --- a/mysql-test/suite/rpl/t/create_or_replace2.test +++ b/mysql-test/suite/rpl/t/create_or_replace2.test @@ -36,6 +36,8 @@ unlock tables; --reap --disconnect con1 +--source include/show_binlog_events.inc + # Cleanup drop function f1; drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_strict.test b/mysql-test/suite/rpl/t/rpl_gtid_strict.test index 56ebba824c4..7cbd6304c10 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_strict.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_strict.test @@ -49,7 +49,7 @@ INSERT INTO t1 VALUES (4); SELECT * FROM t1 ORDER BY 1; --source include/show_binlog_events.inc ---echo *** Test non-transactional GTID error (cannot be rolled back). *** +--echo *** Test non-transactional GTID error. *** SET server_id= 3; --error ER_GTID_STRICT_OUT_OF_ORDER SET gtid_seq_no= 1; @@ -58,11 +58,6 @@ SET gtid_seq_no= 1; SET SESSION debug_dbug=@old_dbug; --error ER_GTID_STRICT_OUT_OF_ORDER CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=MyISAM; -# The table is still created, DDL cannot be rolled back. -# Fix it up for replication. -SET sql_log_bin= 0; -DROP TABLE t2; -SET sql_log_bin= 1; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=MyISAM; --error ER_GTID_STRICT_OUT_OF_ORDER |