diff options
Diffstat (limited to 'storage/spider/mysql-test/spider/bugfix/t/mdev_29676.test')
-rw-r--r-- | storage/spider/mysql-test/spider/bugfix/t/mdev_29676.test | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_29676.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_29676.test new file mode 100644 index 00000000000..565d95dfaac --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_29676.test @@ -0,0 +1,41 @@ +--echo # +--echo # MDEV-29676 Dual thread hang in 'closing tables' and 'Waiting for table metadata lock' on Spider CREATE OR REPLACE TABLE +--echo # + +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +--replace_regex /SOCKET ".*"/SOCKET "$MASTER_1_MYSOCK"/ +eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +--echo +--echo # length-0 self-reference +--echo +CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t"'; +CREATE OR REPLACE TABLE t (c INT); +SHOW CREATE TABLE t; +DROP TABLE t; + +--echo +--echo # length-2 self-reference +--echo +CREATE TABLE t2 (c int); +CREATE TABLE t1 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; +CREATE TABLE t0 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t1"'; +ALTER TABLE t2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t0"'; +# warnings +CREATE OR REPLACE TABLE t0 (c int); +SHOW CREATE TABLE t0; +# no warnings +CREATE OR REPLACE TABLE t1 (c int); +SHOW CREATE TABLE t1; +drop TABLE t0, t1, t2; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log |