diff options
Diffstat (limited to 'mysql-test/t/flush.test')
-rw-r--r-- | mysql-test/t/flush.test | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/mysql-test/t/flush.test b/mysql-test/t/flush.test index a1df9359d30..81834b7de10 100644 --- a/mysql-test/t/flush.test +++ b/mysql-test/t/flush.test @@ -303,19 +303,16 @@ insert into t3 (a) values (2); --echo # III. Concurrent tests. --echo # connect (con1,localhost,root,,); ---echo # --> connection default --echo # --echo # Check that flush tables <list> with read lock --echo # does not affect non-locked tables. connection default; --echo # flush tables t1 with read lock; ---echo # --> connection con1; connection con1; select * from t1; select * from t2; insert into t2 (a) values (3); ---echo # --> connection default; connection default; unlock tables; --echo # @@ -324,12 +321,10 @@ unlock tables; --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 # @@ -338,11 +333,9 @@ unlock tables; --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 # @@ -350,11 +343,9 @@ unlock tables; --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 # @@ -362,15 +353,12 @@ set global read_only=0; --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; --source include/wait_until_disconnected.inc @@ -440,13 +428,11 @@ drop table if exists t1; --enable_warnings connect (con1,localhost,root,,); connect (con2,localhost,root,,); ---echo # --> conection default connection default; create table t1 (a int); begin; select * from t1; ---echo # --> connection con1 connection con1; --echo # --echo # Issue a LOCK TABLE t1 READ. We could use HANDLER t1 OPEN @@ -454,13 +440,11 @@ connection con1; --echo # prevents FLUSH TABLE t1 from immediate completion would do. --echo # lock table t1 read; ---echo # --> connection con2 connection con2; --echo # --echo # FLUSH TABLE expels the table definition from the cache. --echo # Sending 'flush table t1'... send flush table t1; ---echo # --> connection default connection default; --echo # Let flush table sync in. let $wait_condition= @@ -469,7 +453,6 @@ let $wait_condition= and info = "flush table t1"; --source include/wait_condition.inc send select * from t1; ---echo # --> connection con1 connection con1; let $wait_condition= select count(*) = 1 from information_schema.processlist @@ -477,11 +460,9 @@ let $wait_condition= and info = "select * from t1"; select * from t1; unlock tables; ---echo # --> connection con2 connection con2; --echo # Reaping 'flush table t1'... reap; ---echo # --> connection default connection default; --echo # Reaping 'select * from t1'... reap; @@ -493,19 +474,16 @@ commit; begin; select * from t1; ---echo # --> connection con1 connection con1; --echo # --echo # Issue a LOCK TABLE t1 READ. --echo # lock table t1 read; ---echo # --> connection con2 connection con2; --echo # --echo # FLUSH TABLES expels the table definition from the cache. --echo # Sending 'flush tables'... send flush tables; ---echo # --> connection default connection default; --echo # Let flush table sync in. let $wait_condition= @@ -514,7 +492,6 @@ let $wait_condition= and info = "flush tables"; --source include/wait_condition.inc send select * from t1; ---echo # --> connection con1 connection con1; let $wait_condition= select count(*) = 1 from information_schema.processlist @@ -522,11 +499,9 @@ let $wait_condition= and info = "select * from t1"; select * from t1; unlock tables; ---echo # --> connection con2 connection con2; --echo # Reaping 'flush tables'... reap; ---echo # --> connection default connection default; --echo # Reaping 'select * from t1'... reap; @@ -534,15 +509,12 @@ commit; --echo # Cleanup ---echo # --> connection con1 connection con1; disconnect con1; --source include/wait_until_disconnected.inc ---echo # --> connection con2 connection con2; disconnect con2; --source include/wait_until_disconnected.inc ---echo # --> connection default connection default; drop table t1; @@ -593,12 +565,10 @@ create table t1 (i int); create table t2 (i int); handler t1 open; ---echo # Switching to connection 'con1'. connection con1; --echo # Sending: --send flush tables with read lock ---echo # Switching to connection 'con2'. connection con2; --echo # Wait until FTWRL starts waiting for 't1' to be closed. let $wait_condition= @@ -607,13 +577,11 @@ let $wait_condition= and info = "flush tables with read lock"; --source include/wait_condition.inc ---echo # Switching to connection 'default'. connection default; --echo # The below statement should not cause deadlock. --echo # Sending: --send insert into t2 values (1) ---echo # Switching to connection 'con2'. connection con2; --echo # Wait until INSERT starts to wait for FTWRL to go away. let $wait_condition= @@ -622,14 +590,12 @@ let $wait_condition= and info = "insert into t2 values (1)"; --source include/wait_condition.inc ---echo # Switching to connection 'con1'. connection con1; --echo # FTWRL should be able to continue now. --echo # Reap FTWRL. --reap unlock tables; ---echo # Switching to connection 'default'. connection default; --echo # Reap INSERT. --reap @@ -688,7 +654,6 @@ CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW SET @var = "a"; BEGIN; UPDATE t1 SET value= value + 1 WHERE id = 1; ---echo # Switching to connection 'con1'. connect(con1, localhost, root); --echo # The below FLUSH TABLES WITH READ LOCK should succeed and --echo # should not be blocked by the transaction in default connection. @@ -697,7 +662,6 @@ UNLOCK TABLES; disconnect con1; --source include/wait_until_disconnected.inc ---echo # Switching to connection 'default'. connection default; COMMIT; DROP TABLE t1; |