From cf9b3b25b41f714d681c80736e98c402076d989b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 9 Sep 2020 13:05:19 +0300 Subject: [PATCH] MDEV-23608 : galera_sr.GCF-597 MTR failed: query 'ROLLBACK' succeeded - should have failed with errno 1213 Added wait_condition to wait correct streaming state. --- mysql-test/suite/galera_sr/r/GCF-597.result | 6 ++++++ mysql-test/suite/galera_sr/t/GCF-597.test | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/galera_sr/r/GCF-597.result b/mysql-test/suite/galera_sr/r/GCF-597.result index 7afca229251..52b13ba3268 100644 --- a/mysql-test/suite/galera_sr/r/GCF-597.result +++ b/mysql-test/suite/galera_sr/r/GCF-597.result @@ -15,7 +15,13 @@ INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (5); +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; connection node_2; ROLLBACK; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction DROP TABLE t1; +disconnect node_1a; +disconnect node_2a; diff --git a/mysql-test/suite/galera_sr/t/GCF-597.test b/mysql-test/suite/galera_sr/t/GCF-597.test index d3d80ffc4f8..9c86e598154 100644 --- a/mysql-test/suite/galera_sr/t/GCF-597.test +++ b/mysql-test/suite/galera_sr/t/GCF-597.test @@ -22,8 +22,21 @@ INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (5); +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +--let $wait_condition = SELECT COUNT(*) = 5 FROM mysql.wsrep_streaming_log +--source include/wait_condition.inc + +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--connection node_2a +--let $wait_condition = SELECT COUNT(*) = 5 FROM mysql.wsrep_streaming_log +--source include/wait_condition.inc + --connection node_2 --error ER_LOCK_DEADLOCK ROLLBACK; -DROP TABLE t1; \ No newline at end of file +DROP TABLE t1; + +--disconnect node_1a +--disconnect node_2a