Skip to content

Commit 509c7f6

Browse files
author
Jan Lindström
committed
MDEV-27977 : galera.galera_UK_conflict fails with wrong result
Add wait_condition so that all rows expected are really replicated before we check it.
1 parent 15226a2 commit 509c7f6

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

mysql-test/suite/galera/r/galera_UK_conflict.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ SET debug_sync='RESET';
144144
connection node_1;
145145
SET GLOBAL wsrep_slave_threads = DEFAULT;
146146
connection node_2;
147-
SET SESSION wsrep_sync_wait=15;
148147
SELECT * FROM t1;
149148
f1 f2 f3
150149
1 1 0

mysql-test/suite/galera/t/galera_UK_conflict.test

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ SELECT * FROM t1;
140140
# original state in node 1
141141
INSERT INTO t1 VALUES (7,7,7);
142142
INSERT INTO t1 VALUES (8,8,8);
143+
SELECT COUNT(*) FROM t1;
144+
SELECT * FROM t1;
145+
146+
--connection node_1
147+
--let $wait_condition = SELECT COUNT(*) = 7 FROM t1
148+
--source include/wait_condition.inc
149+
SELECT COUNT(*) FROM t1;
150+
SELECT * FROM t1;
143151

144152
DROP TABLE t1;
145153

@@ -268,12 +276,20 @@ SET debug_sync='RESET';
268276
SET GLOBAL wsrep_slave_threads = DEFAULT;
269277

270278
--connection node_2
271-
SET SESSION wsrep_sync_wait=15;
272279
SELECT * FROM t1;
273280

274281
# replicate some transactions, so that wsrep slave thread count can reach
275282
# original state in node 1
276283
INSERT INTO t1 VALUES (7,7,7);
277284
INSERT INTO t1 VALUES (8,8,8);
278285

286+
SELECT COUNT(*) FROM t1;
287+
SELECT * FROM t1;
288+
289+
--connection node_1
290+
--let $wait_condition = SELECT COUNT(*) = 7 FROM t1
291+
--source include/wait_condition.inc
292+
SELECT COUNT(*) FROM t1;
293+
SELECT * FROM t1;
294+
279295
DROP TABLE t1;

0 commit comments

Comments
 (0)