summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-11-21 17:14:14 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2016-11-21 17:14:14 -0500
commit4a27ab23cb2e2e9cc4e10614850a4f996c499090 (patch)
treedce543be4f20780a03bbe93767ba89d15abdd576 /mysql-test
parentebe061900b01e4b9ad69860a0e15df44b0ebbb92 (diff)
downloadmariadb-git-4a27ab23cb2e2e9cc4e10614850a4f996c499090.tar.gz
MDEV-10792: Assertion `thd->mdl_context.is_lock_owner ..bb-10.2-nirbhay
.. (MDL_key::TABLE, table->db, table->table_name, MDL_SHARED)' failed in mysql_rm_table_no_locks Reset error flag after temporary table has been successfully dropped.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/temp_table.result8
-rw-r--r--mysql-test/t/temp_table.test9
2 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result
index 81358db0dd6..b833f4f9768 100644
--- a/mysql-test/r/temp_table.result
+++ b/mysql-test/r/temp_table.result
@@ -538,5 +538,13 @@ UNLOCK TABLES;
ALTER TABLE t1 RENAME t2, LOCK SHARED;
ALTER TABLE t2 RENAME t1, LOCK EXCLUSIVE;
DROP TABLE t1;
+#
+# MDEV-10792: Assertion `thd->mdl_context.is_lock_owner
+# (MDL_key::TABLE, table->db, table->table_name, MDL_SHARED)'
+# failed in mysql_rm_table_no_locks
+#
+CREATE TEMPORARY TABLE t1 (i INT);
+DROP TABLE nonexisting_table, t1;
+ERROR 42S02: Unknown table 'temp_db.nonexisting_table'
# Cleanup
DROP DATABASE temp_db;
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index 7ba4de34ea9..fb44362b537 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -583,6 +583,15 @@ ALTER TABLE t2 RENAME t1, LOCK EXCLUSIVE;
DROP TABLE t1;
+--echo #
+--echo # MDEV-10792: Assertion `thd->mdl_context.is_lock_owner
+--echo # (MDL_key::TABLE, table->db, table->table_name, MDL_SHARED)'
+--echo # failed in mysql_rm_table_no_locks
+--echo #
+CREATE TEMPORARY TABLE t1 (i INT);
+--error ER_BAD_TABLE_ERROR
+DROP TABLE nonexisting_table, t1;
+
--echo # Cleanup
DROP DATABASE temp_db;