From 65e73b56d214dd3e796c5560785d4e6597c954e5 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 28 Apr 2021 18:50:13 +0200 Subject: [PATCH] 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. --- mysql-test/main/lock.result | 15 +++++++++++++++ mysql-test/main/lock.test | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) 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 #