Commit a6b92690 authored by Jan Lindström's avatar Jan Lindström

MDEV-21556 : galera.lp1376747-4 MTR failed: Result length mismatch

Add proper wait condition instead of sleeps.
parent f6663bfb
...@@ -27,25 +27,24 @@ INSERT INTO t1 VALUES (2,3); ...@@ -27,25 +27,24 @@ INSERT INTO t1 VALUES (2,3);
--connection node_2a --connection node_2a
SET session wsrep_sync_wait=0; SET session wsrep_sync_wait=0;
SET session wsrep_causal_reads=OFF; SET session wsrep_causal_reads=OFF;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
--sleep 1
--send FLUSH TABLES t1 WITH READ LOCK; --send FLUSH TABLES t1 WITH READ LOCK;
--connection node_2 --connection node_2
# let the flush table wait in pause state before we unlock --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
# table otherwise there is window where-in flush table is --source include/wait_condition.inc
# yet to wait in pause and unlock allows alter table to proceed.
# this is because send in asynchronous.
--sleep 3
# this will release existing lock but will not resume
# the cluster as there is new FTRL that is still pausing it.
UNLOCK TABLES; UNLOCK TABLES;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
--connection node_2a --connection node_2a
--reap --reap
UNLOCK TABLES; UNLOCK TABLES;
--sleep 2
--let $wait_condition = SELECT COUNT(*) = 2 FROM t1;
--source include/wait_condition.inc
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * from t1; SELECT * from t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment