summaryrefslogtreecommitdiff
path: root/mysql-test/r/flush.result
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-08-05 15:37:24 +0200
committerunknown <ingo@mysql.com>2005-08-05 15:37:24 +0200
commit2977a3a4b15e282517ebf958445c218ae1d71bd5 (patch)
tree320bd255e908b957697ec7d21126f178c1592b52 /mysql-test/r/flush.result
parent75c06af27784e6fa6ba23f4cd6803bc7574f8253 (diff)
downloadmariadb-git-2977a3a4b15e282517ebf958445c218ae1d71bd5.tar.gz
Bug#9459 - deadlock with flush with lock, and lock table write
Added a check before taking a global read lock if the own thread has a write locked table. mysql-test/r/flush.result: Bug#9459 - deadlock with flush with lock, and lock table write The test result. mysql-test/t/flush.test: Bug#9459 - deadlock with flush with lock, and lock table write The test case.
Diffstat (limited to 'mysql-test/r/flush.result')
-rw-r--r--mysql-test/r/flush.result21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result
index bab9b543307..384bdc1214b 100644
--- a/mysql-test/r/flush.result
+++ b/mysql-test/r/flush.result
@@ -27,3 +27,24 @@ select * from t1;
n
345
drop table t1;
+create table t1 (c1 int);
+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
+lock table t1 read;
+flush tables with read lock;
+lock table t1 write;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+lock table t1 read;
+lock table t1 write;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+unlock tables;
+create table t2 (c1 int);
+create table t3 (c1 int);
+lock table t1 read, t2 read, t3 write;
+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 read, t2 read, t3 read;
+flush tables with read lock;
+unlock tables;
+drop table t1, t2, t3;