summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-26 19:56:23 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-26 19:56:23 +0100
commit44002a34e680c79c01df879b540458c2885e97e8 (patch)
tree1bf3d7685eea7d97ff7eb91f093c8430f53efbe8 /mysql-test
parentded448d1d035d211c8146141546a08126bb728b6 (diff)
downloadmariadb-git-44002a34e680c79c01df879b540458c2885e97e8.tar.gz
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
first unlock locked tables, then close and remove temporary
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
+