Skip to content

Commit 8993e40

Browse files
author
Jan Lindström
committed
MDEV-23709 : Galera test failure on galera_fk_cascade_delete_debug
Add wait_condition so that inserts to parent and child are replicated and applied before we set debug sync point.
1 parent f19da4a commit 8993e40

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ ON DELETE CASCADE
4646
) ENGINE=InnoDB;
4747
INSERT INTO parent VALUES (1);
4848
INSERT INTO child VALUES (1,0,1);
49+
connection node_2;
4950
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
5051
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
5152
connection node_2;

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,21 @@ CREATE TABLE child (
6161
INSERT INTO parent VALUES (1);
6262
INSERT INTO child VALUES (1,0,1);
6363

64+
--connection node_2
65+
--let $wait_condition = SELECT COUNT(*) = 1 FROM child;
66+
--source include/wait_condition.inc
67+
6468
# block applier before applying
6569
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
6670
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
6771

6872
--connection node_2
69-
--let $wait_condition = SELECT COUNT(*) = 1 FROM child;
70-
--source include/wait_condition.inc
7173
DELETE FROM parent;
7274

7375
--connection node_1a
7476
# wait until applier has reached the sync point
7577
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
7678

77-
7879
--connection node_1
7980
# issue conflicting write to child table, it should fail in certification
8081
--error ER_LOCK_DEADLOCK

0 commit comments

Comments
 (0)