summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2023-01-18 16:52:13 +0300
committerAleksey Midenkov <midenok@gmail.com>2023-01-26 17:15:21 +0300
commit870e7d182e443cbeb8814b65f3fe21eea25ff010 (patch)
tree6a83ded319fd55cd4446f0c1d96a102e6378058a
parent5a7871b59924a9171a4c5e5ce48de7539bacd29c (diff)
downloadmariadb-git-870e7d182e443cbeb8814b65f3fe21eea25ff010.tar.gz
MDEV-29664 Spider test case
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_29664.result20
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_29664.test31
2 files changed, 51 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_29664.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_29664.result
new file mode 100644
index 00000000000..4dc84334ace
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_29664.result
@@ -0,0 +1,20 @@
+#
+# MDEV-29664 Assertion `!n_mysql_tables_in_use' failed in innobase_close_connection
+#
+for master_1
+for child2
+for child3
+connection master_1;
+create database auto_test_local;
+use auto_test_local;
+set spider_same_server_link= on;
+create table t (c int) engine=innodb;
+create table t1 (c1 text) ENGINE=Spider DEFAULT CHARSET=utf8
+comment='wrapper "mysql", srv "s_1", table "t"';
+create or replace table t2 engine=innodb
+as select format (c1,0) as c1 from t1;
+ERROR 42S22: Unknown column 't0.c1' in 'field list'
+drop database auto_test_local;
+for master_1
+for child2
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_29664.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_29664.test
new file mode 100644
index 00000000000..bf3bfc17b90
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_29664.test
@@ -0,0 +1,31 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-29664 Assertion `!n_mysql_tables_in_use' failed in innobase_close_connection
+--echo #
+
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+
+--connection master_1
+create database auto_test_local;
+use auto_test_local;
+set spider_same_server_link= on;
+
+create table t (c int) engine=innodb;
+eval create table t1 (c1 text) $MASTER_1_ENGINE $MASTER_1_CHARSET
+comment='wrapper "mysql", srv "s_1", table "t"';
+--error ER_BAD_FIELD_ERROR
+create or replace table t2 engine=innodb
+as select format (c1,0) as c1 from t1;
+
+drop database auto_test_local;
+
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log