summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/locked_temporary-5955.result2
-rw-r--r--mysql-test/t/locked_temporary-5955.test10
2 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/locked_temporary-5955.result b/mysql-test/r/locked_temporary-5955.result
new file mode 100644
index 00000000000..8999bdd39c4
--- /dev/null
+++ b/mysql-test/r/locked_temporary-5955.result
@@ -0,0 +1,2 @@
+CREATE TEMPORARY TABLE tmp (i INT) ENGINE=InnoDB;
+LOCK TABLES tmp AS p WRITE;
diff --git a/mysql-test/t/locked_temporary-5955.test b/mysql-test/t/locked_temporary-5955.test
new file mode 100644
index 00000000000..1ade63f4913
--- /dev/null
+++ b/mysql-test/t/locked_temporary-5955.test
@@ -0,0 +1,10 @@
+#
+# MDEV-5955 Server crashes in handler::ha_external_lock or assertion `m_lock_type == 2' fails in handler::ha_close on disconnect with a locked temporary table
+#
+
+--source include/have_innodb.inc
+--connect (con1,localhost,root,,)
+CREATE TEMPORARY TABLE tmp (i INT) ENGINE=InnoDB;
+LOCK TABLES tmp AS p WRITE;
+--disconnect con1
+