summaryrefslogtreecommitdiff
path: root/mysql-test/r/lock.result
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2009-12-08 14:14:05 +0100
committerJon Olav Hauglid <jon.hauglid@sun.com>2009-12-08 14:14:05 +0100
commita164203fea122604d4167886102e61fbff6ccd1f (patch)
treed7fadbb5bebb95099083e937e9bf883c071032c2 /mysql-test/r/lock.result
parentce5c87a3d359d528111d84b5c75bdb8acfe3fb9c (diff)
downloadmariadb-git-a164203fea122604d4167886102e61fbff6ccd1f.tar.gz
Backport of revno: 2617.56.21
Bug #45066 FLUSH TABLES WITH READ LOCK deadlocks against LOCK TABLE Test coverage for combinations of LOCK TABLE READ / WRITE and FLUSH TABLES / FLUSH TABLES WITH READ LOCK added to lock.test. LOCK and FLUSH are executed sequentially from one connection.
Diffstat (limited to 'mysql-test/r/lock.result')
-rw-r--r--mysql-test/r/lock.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result
index 46ce618b99b..afb444f8ae9 100644
--- a/mysql-test/r/lock.result
+++ b/mysql-test/r/lock.result
@@ -319,5 +319,27 @@ alter table t1 add column j int;
unlock tables;
drop table t1;
#
+# Bug#45066 FLUSH TABLES WITH READ LOCK deadlocks against
+# LOCK TABLE
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+FLUSH TABLES;
+ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
+LOCK TABLE t1 WRITE;
+FLUSH TABLES;
+#
+# If you allow the next combination, you reintroduce bug Bug#45066
+#
+LOCK TABLE t1 READ;
+FLUSH TABLES WITH READ LOCK;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+LOCK TABLE t1 WRITE;
+FLUSH TABLES WITH READ LOCK;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+UNLOCK TABLES;
+DROP TABLE t1;
+#
# End of 6.0 tests.
#