diff options
Diffstat (limited to 'mysql-test/t/lock_multi.test')
-rw-r--r-- | mysql-test/t/lock_multi.test | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index 6bdb235903d..5bab5e647ab 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -228,7 +228,7 @@ connection writer; # Sleep a bit till the flush of connection locker is in work and hangs let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock" and + where state = "Waiting for global read lock" and info = "FLUSH TABLES WITH READ LOCK"; --source include/wait_condition.inc # This must not block. @@ -260,7 +260,7 @@ connection writer; # Sleep a bit till the flush of connection locker is in work and hangs let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock" and + where state = "Waiting for global read lock" and info = "FLUSH TABLES WITH READ LOCK"; --source include/wait_condition.inc --error ER_TABLE_NOT_LOCKED @@ -296,10 +296,11 @@ DROP DATABASE mysqltest_1; # With bug in place: try to acquire LOCK_mysql_create_table... # When fixed: Reject dropping db because of the read lock. connection con1; -# Wait a bit so that the session con2 is in state "Waiting for release of readlock" +# Wait a bit so that the session con2 is in state +# "Waiting for global read lock" let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for release of readlock" + where state = "Waiting for global read lock" and info = "DROP DATABASE mysqltest_1"; --source include/wait_condition.inc --error ER_CANT_UPDATE_WITH_READLOCK @@ -376,7 +377,7 @@ connection con5; --echo # con5 let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock" and + where state = "Waiting for global read lock" and info = "flush tables with read lock"; --source include/wait_condition.inc --echo # global read lock is taken @@ -384,10 +385,11 @@ connection con3; --echo # con3 send select * from t2 for update; connection con5; -let $show_statement= SHOW PROCESSLIST; -let $field= State; -let $condition= = 'Waiting for release of readlock'; ---source include/wait_show_condition.inc +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for global read lock" and + info = "select * from t2 for update"; +--source include/wait_condition.inc --echo # waiting for release of read lock connection con4; --echo # con4 @@ -433,10 +435,11 @@ connection con1; send update t2 set a = 1; connection default; --echo # default -let $show_statement= SHOW PROCESSLIST; -let $field= State; -let $condition= = 'Waiting for release of readlock'; ---source include/wait_show_condition.inc +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for global read lock" and + info = "update t2 set a = 1"; +--source include/wait_condition.inc --echo # statement is waiting for release of read lock connection con2; --echo # con2 @@ -460,10 +463,11 @@ connection con1; send lock tables t2 write; connection default; --echo # default -let $show_statement= SHOW PROCESSLIST; -let $field= State; -let $condition= = 'Waiting for release of readlock'; ---source include/wait_show_condition.inc +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for global read lock" and + info = "lock tables t2 write"; +--source include/wait_condition.inc --echo # statement is waiting for release of read lock connection con2; --echo # con2 @@ -571,7 +575,8 @@ connection default; --echo connection: default let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock"; + where state = "Waiting for global read lock" and + info = "flush tables with read lock"; --source include/wait_condition.inc alter table t1 add column j int; connect (insert,localhost,root,,test,,); @@ -579,14 +584,16 @@ connection insert; --echo connection: insert let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock"; + where state = "Waiting for global read lock" and + info = "flush tables with read lock"; --source include/wait_condition.inc --send insert into t1 values (1,2); --echo connection: default connection default; let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for release of readlock"; + where state = "Waiting for global read lock" and + info = "insert into t1 values (1,2)"; --source include/wait_condition.inc unlock tables; connection flush; @@ -594,7 +601,8 @@ connection flush; --reap let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for release of readlock"; + where state = "Waiting for global read lock" and + info = "insert into t1 values (1,2)"; --source include/wait_condition.inc select * from t1; unlock tables; @@ -629,12 +637,12 @@ connection default; --echo connection: default let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock"; + where state = "Waiting for global read lock"; --source include/wait_condition.inc flush tables; let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock"; + where state = "Waiting for global read lock"; --source include/wait_condition.inc unlock tables; connection flush; @@ -698,12 +706,12 @@ connection default; --echo connection: default let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock"; + where state = "Waiting for global read lock"; --source include/wait_condition.inc flush tables; let $wait_condition= select count(*) = 1 from information_schema.processlist - where state = "Waiting for global metadata lock"; + where state = "Waiting for global read lock"; --source include/wait_condition.inc drop table t1; connection flush; |