summaryrefslogtreecommitdiff
path: root/mysql-test/t/lock_multi.test
diff options
context:
space:
mode:
authorunknown <davi@moksha.local>2007-08-17 11:34:12 -0300
committerunknown <davi@moksha.local>2007-08-17 11:34:12 -0300
commit8bdb043f087ffbad27ab6daaeba8954b41711b57 (patch)
tree74929bc92e9f78a68ece540e3c2f9161d5b9dd9e /mysql-test/t/lock_multi.test
parentd811750fe890293970be9cd8d7b73258dd280da5 (diff)
downloadmariadb-git-8bdb043f087ffbad27ab6daaeba8954b41711b57.tar.gz
Bug#25856 (HANDLER table OPEN in one connection lock DROP TABLE in another one)
mysql_ha_open calls mysql_ha_close on the error path (unsupported) to close the (opened) table before inserting it into the tables hash list handler_tables_hash) but mysql_ha_close only closes tables which are on the hash list, causing the table to be left open and locked. This change moves the table close logic into a separate function that is always called on the error path of mysql_ha_open or on a normal handler close (mysql_ha_close). mysql-test/r/lock_multi.result: Bug#25856 test result mysql-test/t/lock_multi.test: Bug#25856 test case sql/sql_handler.cc: Move the table close logic into a separate function that is always called on the error path of mysql_ha_open or on a normal handler close.
Diffstat (limited to 'mysql-test/t/lock_multi.test')
-rw-r--r--mysql-test/t/lock_multi.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index 8ffa67f8439..b2266c9bff1 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -328,4 +328,19 @@ unlock tables;
connection default;
drop table t1;
+#
+# Bug#25856 - HANDLER table OPEN in one connection lock DROP TABLE in another one
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (a int) ENGINE=MEMORY;
+--echo --> client 2
+connection locker;
+--error 1031
+handler t1 open;
+--echo --> client 1
+connection default;
+drop table t1;
+
--echo End of 5.1 tests