Commit 8993e40d authored by Jan Lindström's avatar Jan Lindström

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.
parent f19da4a0
......@@ -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;
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment