diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-08-12 17:50:23 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-08-12 17:50:23 +0400 |
commit | 29c4873ad5bb0e0f3eb1faf3f22ec00f11ca5cb4 (patch) | |
tree | 9e8417877eab9778cb09f99e71c11401e7749bbc /mysql-test/t/flush.test | |
parent | 265a6edd23cfdb69c6ac072bf01887f7aed1168c (diff) | |
parent | 00496b7acd1f2ac8b099ba7e6a4c7bbf09178384 (diff) | |
download | mariadb-git-29c4873ad5bb0e0f3eb1faf3f22ec00f11ca5cb4.tar.gz |
Commit on behalf of Dmitry Lenev.
Merge his patch for Bug#52044 into 5.5, and apply
review comments.
Diffstat (limited to 'mysql-test/t/flush.test')
-rw-r--r-- | mysql-test/t/flush.test | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/t/flush.test b/mysql-test/t/flush.test index 0d406338394..cd3df229f10 100644 --- a/mysql-test/t/flush.test +++ b/mysql-test/t/flush.test @@ -318,6 +318,58 @@ insert into t2 (a) values (3); --echo # --> connection default; connection default; unlock tables; +--echo # +--echo # Check that "FLUSH TABLES <list> WITH READ LOCK" is +--echo # compatible with active "FLUSH TABLES WITH READ LOCK". +--echo # Vice versa it is not true, since tables read-locked by +--echo # "FLUSH TABLES <list> WITH READ LOCK" can't be flushed. +flush tables with read lock; +--echo # --> connection con1; +connection con1; +flush table t1 with read lock; +select * from t1; +unlock tables; +--echo # --> connection default; +connection default; +unlock tables; +--echo # +--echo # Check that FLUSH TABLES t1 WITH READ LOCK +--echo # does not conflict with an existing FLUSH TABLES t2 +--echo # WITH READ LOCK. +--echo # +flush table t1 with read lock; +--echo # --> connection con1 +connection con1; +flush table t2 with read lock; +unlock tables; +--echo # --> connection default +connection default; +unlock tables; +--echo # +--echo # Check that FLUSH TABLES t1 WITH READ LOCK +--echo # does not conflict with SET GLOBAL read_only=1. +--echo # +set global read_only=1; +--echo # connection con1 +connection con1; +flush table t1 with read lock; +unlock tables; +--echo # connection default +connection default; +set global read_only=0; +--echo # +--echo # Check that it's possible to read-lock +--echo # tables locked with FLUSH TABLE <list> WITH READ LOCK. +--echo # +flush tables t1, t2 with read lock; +--echo # connection con1 +connection con1; +lock table t1 read, t2 read; +unlock tables; +--echo # connection default +connection default; +unlock tables; + --echo # --> connection con1 connection con1; disconnect con1; |