Skip to content

Commit

Permalink
MDEV-23709 : Galera test failure on galera_fk_cascade_delete_debug
Browse files Browse the repository at this point in the history
Add wait_condition so that inserts to parent and child are replicated
and applied before we set debug sync point.
  • Loading branch information
Jan Lindström committed Sep 10, 2020
1 parent f19da4a commit 8993e40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ ON DELETE CASCADE
) ENGINE=InnoDB;
INSERT INTO parent VALUES (1);
INSERT INTO child VALUES (1,0,1);
connection node_2;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
connection node_2;
Expand Down
7 changes: 4 additions & 3 deletions mysql-test/suite/galera/t/galera_fk_cascade_delete_debug.test
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,21 @@ CREATE TABLE child (
INSERT INTO parent VALUES (1);
INSERT INTO child VALUES (1,0,1);

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM child;
--source include/wait_condition.inc

# block applier before applying
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";

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

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


--connection node_1
# issue conflicting write to child table, it should fail in certification
--error ER_LOCK_DEADLOCK
Expand Down

0 comments on commit 8993e40

Please sign in to comment.