diff options
Diffstat (limited to 'mysql-test/suite/galera/t/lp1376747-4.test')
-rw-r--r-- | mysql-test/suite/galera/t/lp1376747-4.test | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-test/suite/galera/t/lp1376747-4.test index 7cf922b97e5..d19ff422ab0 100644 --- a/mysql-test/suite/galera/t/lp1376747-4.test +++ b/mysql-test/suite/galera/t/lp1376747-4.test @@ -5,7 +5,8 @@ # after provider is unpaused # --source include/galera_cluster.inc ---source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc --let $galera_connection_name = node_2a --let $galera_server_number = 2 @@ -17,7 +18,7 @@ INSERT INTO t1 VALUES (1); --connection node_2 SET session wsrep_sync_wait=0; -FLUSH TABLE WITH READ LOCK; +FLUSH TABLES WITH READ LOCK; --connection node_1 ALTER TABLE t1 ADD COLUMN f2 INTEGER; @@ -25,32 +26,33 @@ INSERT INTO t1 VALUES (2,3); --connection node_2a SET session wsrep_sync_wait=0; - ---echo # node_1 DDL should not yet be applied SHOW CREATE TABLE t1; - +SET debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked2 WAIT_FOR go2'; --send FLUSH TABLES t1 WITH READ LOCK; --connection node_2 ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%'; ---source include/wait_condition.inc - +SET debug_sync='now WAIT_FOR parked2'; + +# let the flush table wait in pause state before we unlock +# table otherwise there is window where-in flush table is +# yet to wait in pause and unlock allows alter table to proceed. +# this is because send is asynchronous. +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE Info LIKE 'FLUSH TABLES t1 WITH READ LOCK'; +--let $wait_condition_on_error_output = SHOW PROCESSLIST +--source include/wait_condition_with_debug.inc + +SET debug_sync='now SIGNAL go2'; +# this will release existing lock but will not resume +# the cluster as there is new FTRL that is still pausing it. UNLOCK TABLES; - ---echo # node_1 DDL should not yet be applied 2 SHOW CREATE TABLE t1; +set debug_sync= 'RESET'; --connection node_2a --reap UNLOCK TABLES; ---let $wait_condition = SELECT COUNT(*) = 2 FROM t1; ---source include/wait_condition.inc - ---let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 't1'; ---source include/wait_condition.inc - ---echo # node_1 DDL should be applied 2 +SET SESSION wsrep_sync_wait = DEFAULT; SHOW CREATE TABLE t1; SELECT * from t1; |