summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-04-28 18:50:13 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2021-04-28 18:50:13 +0200
commit65e73b56d214dd3e796c5560785d4e6597c954e5 (patch)
tree188f20a00825d24c4202b8ff46c0ebcdd62b8e13
parent3f4b7ed95a4f5599fe41ab0ebe83e5cc123b5e80 (diff)
downloadmariadb-git-65e73b56d214dd3e796c5560785d4e6597c954e5.tar.gz
MDEV-24382 Assertion in tdc_remove_table
The assert is no more reproducible in the lastest 10.5-10.6 The patch only adds testcase from MDEV-24382.
-rw-r--r--mysql-test/main/lock.result15
-rw-r--r--mysql-test/main/lock.test18
2 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/main/lock.result b/mysql-test/main/lock.result
index e76c04520eb..7abeaf035ee 100644
--- a/mysql-test/main/lock.result
+++ b/mysql-test/main/lock.result
@@ -520,3 +520,18 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+#
+# MDEV-24382 Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)'
+# failed in tdc_remove_table
+#
+CREATE TABLE t (c INT);
+LOCK TABLES t READ LOCAL;
+CREATE TEMPORARY TABLE t (a INT) SELECT 1 AS a;
+DROP SEQUENCE t;
+ERROR 42S02: Unknown SEQUENCE: 'test.t'
+DROP TEMPORARY TABLE t;
+UNLOCK TABLES;
+DROP TABLE t;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/lock.test b/mysql-test/main/lock.test
index 32e4fd47664..8f2435160c3 100644
--- a/mysql-test/main/lock.test
+++ b/mysql-test/main/lock.test
@@ -633,3 +633,21 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # MDEV-24382 Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)'
+--echo # failed in tdc_remove_table
+--echo #
+CREATE TABLE t (c INT);
+LOCK TABLES t READ LOCAL;
+CREATE TEMPORARY TABLE t (a INT) SELECT 1 AS a;
+--error ER_UNKNOWN_SEQUENCES
+DROP SEQUENCE t;
+
+DROP TEMPORARY TABLE t;
+UNLOCK TABLES;
+DROP TABLE t;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #