summaryrefslogtreecommitdiff
path: root/mysql-test/r/lock.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/lock.result')
-rw-r--r--mysql-test/r/lock.result22
1 files changed, 21 insertions, 1 deletions
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result
index 092c376b34a..c60ec4bc1bd 100644
--- a/mysql-test/r/lock.result
+++ b/mysql-test/r/lock.result
@@ -1,4 +1,4 @@
-drop table if exists t1,t2;
+drop table if exists t1,t2,t3;
CREATE TABLE t1 ( `id` int(11) NOT NULL default '0', `id2` int(11) NOT NULL default '0', `id3` int(11) NOT NULL default '0', `dummy1` char(30) default NULL, PRIMARY KEY (`id`,`id2`), KEY `index_id3` (`id3`)) ENGINE=MyISAM;
insert into t1 (id,id2) values (1,1),(1,2),(1,3);
LOCK TABLE t1 WRITE;
@@ -262,5 +262,25 @@ unlock tables;
drop table t1;
drop view v1;
#
+# WL#4284: Transactional DDL locking
+#
+drop table if exists t1;
+create table t1 (a int);
+set autocommit= 0;
+insert into t1 values (1);
+lock table t1 write;
+# Disconnect
+# Ensure that metadata locks will be released if there is an open
+# transaction (autocommit=off) in conjunction with lock tables.
+drop table t1;
+# Same problem but now for BEGIN
+drop table if exists t1;
+create table t1 (a int);
+begin;
+insert into t1 values (1);
+# Disconnect
+# Ensure that metadata locks held by the transaction are released.
+drop table t1;
+#
# End of 6.0 tests.
#