summaryrefslogtreecommitdiff
path: root/mysql-test/r/lock_multi.result
diff options
context:
space:
mode:
authorunknown <davi@mysql.com/endora.local>2007-11-28 10:18:01 -0200
committerunknown <davi@mysql.com/endora.local>2007-11-28 10:18:01 -0200
commit4b00263596143da75adb51f3d6ac64f1e078d3af (patch)
tree52f66ce381fbd991bde1883dbc2af7d811e16be4 /mysql-test/r/lock_multi.result
parenta8b4bc8165ef531a5a0323bffd5da01b9c020481 (diff)
downloadmariadb-git-4b00263596143da75adb51f3d6ac64f1e078d3af.tar.gz
Bug#31479 Bad lock interaction if CREATE TABLE LIKE is killed
Kill of a CREATE TABLE source_table LIKE statement waiting for a name-lock on the source table causes a bad lock interaction. The mysql_create_like_table() has a bug that if the connection is killed while waiting for the name-lock on the source table, it will jump to the wrong error path and try to unlock the source table and LOCK_open, but both weren't locked. The solution is to simple return when the name lock request is killed, it's safe to do so because no lock was acquired and no cleanup is needed. Original bug report also contains description of other problems related to this scenario but they either already fixed in 5.1 or will be addressed separately (see bug report for details). mysql-test/r/lock_multi.result: Add test case result for Bug#31479 mysql-test/t/lock_multi.test: Add test case for Bug#31479 sql/sql_table.cc: Rerturn TRUE when the lock gets killed.
Diffstat (limited to 'mysql-test/r/lock_multi.result')
-rw-r--r--mysql-test/r/lock_multi.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result
index af49e1a27dc..079f92ca420 100644
--- a/mysql-test/r/lock_multi.result
+++ b/mysql-test/r/lock_multi.result
@@ -88,3 +88,14 @@ alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
unlock tables;
drop table t1;
+drop table if exists t1;
+create table t1 (a int);
+connection: locker
+lock tables t1 read;
+connection: writer
+create table t2 like t1;;
+connection: default
+kill query
+ERROR 70100: Query execution was interrupted
+unlock tables;
+drop table t1;