Skip to content
Permalink
Browse files
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.
  • Loading branch information
Jan Lindström committed Jan 25, 2023
1 parent 15226a2 commit 509c7f6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
@@ -144,7 +144,6 @@ SET debug_sync='RESET';
connection node_1;
SET GLOBAL wsrep_slave_threads = DEFAULT;
connection node_2;
SET SESSION wsrep_sync_wait=15;
SELECT * FROM t1;
f1 f2 f3
1 1 0
@@ -140,6 +140,14 @@ SELECT * FROM t1;
# original state in node 1
INSERT INTO t1 VALUES (7,7,7);
INSERT INTO t1 VALUES (8,8,8);
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;

--connection node_1
--let $wait_condition = SELECT COUNT(*) = 7 FROM t1
--source include/wait_condition.inc
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;

DROP TABLE t1;

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

--connection node_2
SET SESSION wsrep_sync_wait=15;
SELECT * FROM t1;

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

SELECT COUNT(*) FROM t1;
SELECT * FROM t1;

--connection node_1
--let $wait_condition = SELECT COUNT(*) = 7 FROM t1
--source include/wait_condition.inc
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;

DROP TABLE t1;

0 comments on commit 509c7f6

Please sign in to comment.