--source include/have_innodb.inc --source include/have_debug.inc # Embedded server does not support restarting --source include/not_embedded.inc let $MYSQLD_DATADIR=`select @@datadir`; CREATE TABLE t(c0 SERIAL, c1 INT, c2 INT, c3 INT, c4 INT, KEY(c1), KEY(c2), KEY(c2,c1), KEY(c3), KEY(c3,c1), KEY(c3,c2), KEY(c3,c2,c1), KEY(c4), KEY(c4,c1), KEY(c4,c2), KEY(c4,c2,c1), KEY(c4,c3), KEY(c4,c3,c1), KEY(c4,c3,c2), KEY(c4,c3,c2,c1)) ENGINE=InnoDB; CREATE TABLE `#mysql50##sql-ib-foo`(a SERIAL) ENGINE=InnoDB; INSERT INTO t (c1) VALUES (1),(2),(1); let $n= 10; SET DEBUG_DBUG='+d,row_drop_table_add_to_background'; --disable_query_log let $i= $n; while ($i) { eval CREATE TABLE t$i LIKE t; dec $i; } let $i= $n; while ($i) { eval DROP TABLE t$i; dec $i; } --enable_query_log --error ER_DUP_ENTRY CREATE TABLE target (PRIMARY KEY(c1)) ENGINE=InnoDB SELECT * FROM t; --error ER_NO_SUCH_TABLE SELECT * from target; DROP TABLE t; --source include/shutdown_mysqld.inc --remove_files_wildcard $MYSQLD_DATADIR/test #sql-*.ibd --source include/start_mysqld.inc CREATE TABLE t (a INT) ENGINE=InnoDB; DROP TABLE t; --error ER_BAD_TABLE_ERROR DROP TABLE target; CREATE TABLE target (a INT) ENGINE=InnoDB; DROP TABLE target; --error ER_NO_SUCH_TABLE_IN_ENGINE SELECT * FROM `#mysql50##sql-ib-foo`; DROP TABLE `#mysql50##sql-ib-foo`;