From 44002a34e680c79c01df879b540458c2885e97e8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 26 Mar 2014 19:56:23 +0100 Subject: 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 --- mysql-test/r/locked_temporary-5955.result | 2 ++ mysql-test/t/locked_temporary-5955.test | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 mysql-test/r/locked_temporary-5955.result create mode 100644 mysql-test/t/locked_temporary-5955.test (limited to 'mysql-test') 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 + -- cgit v1.2.1