Commit d02d5262 authored by unknown's avatar unknown

Fix race in testcase innodb_plugin.group_commit

The problem was that connection con5, which is supposed to be the leader for
the third group, could if timing was bad end up as participant in the second
group, causing the test to fail.

Fixed by ensuring that group 2 is running before starting the transaction
for group 3.
parent 86008e0c
...@@ -7,6 +7,7 @@ SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group1_running WAI ...@@ -7,6 +7,7 @@ SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group1_running WAI
INSERT INTO t1 VALUES ("con1"); INSERT INTO t1 VALUES ("con1");
set DEBUG_SYNC= "now WAIT_FOR group1_running"; set DEBUG_SYNC= "now WAIT_FOR group1_running";
SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL group2_con2"; SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL group2_con2";
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group2_running";
SET DEBUG_SYNC= "commit_after_release_LOCK_log WAIT_FOR group3_committed"; SET DEBUG_SYNC= "commit_after_release_LOCK_log WAIT_FOR group3_committed";
SET DEBUG_SYNC= "commit_after_group_run_commit_ordered SIGNAL group2_visible WAIT_FOR group2_checked"; SET DEBUG_SYNC= "commit_after_group_run_commit_ordered SIGNAL group2_visible WAIT_FOR group2_checked";
INSERT INTO t1 VALUES ("con2"); INSERT INTO t1 VALUES ("con2");
...@@ -26,6 +27,7 @@ a ...@@ -26,6 +27,7 @@ a
con1 con1
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group3_con5"; SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group3_con5";
SET DEBUG_SYNC= "commit_after_get_LOCK_log SIGNAL con5_leader WAIT_FOR con6_queued"; SET DEBUG_SYNC= "commit_after_get_LOCK_log SIGNAL con5_leader WAIT_FOR con6_queued";
set DEBUG_SYNC= "now WAIT_FOR group2_running";
INSERT INTO t1 VALUES ("con5"); INSERT INTO t1 VALUES ("con5");
SET DEBUG_SYNC= "now WAIT_FOR con5_leader"; SET DEBUG_SYNC= "now WAIT_FOR con5_leader";
SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL con6_queued"; SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL con6_queued";
......
...@@ -37,6 +37,7 @@ send INSERT INTO t1 VALUES ("con1"); ...@@ -37,6 +37,7 @@ send INSERT INTO t1 VALUES ("con1");
connection con2; connection con2;
set DEBUG_SYNC= "now WAIT_FOR group1_running"; set DEBUG_SYNC= "now WAIT_FOR group1_running";
SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL group2_con2"; SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL group2_con2";
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group2_running";
SET DEBUG_SYNC= "commit_after_release_LOCK_log WAIT_FOR group3_committed"; SET DEBUG_SYNC= "commit_after_release_LOCK_log WAIT_FOR group3_committed";
SET DEBUG_SYNC= "commit_after_group_run_commit_ordered SIGNAL group2_visible WAIT_FOR group2_checked"; SET DEBUG_SYNC= "commit_after_group_run_commit_ordered SIGNAL group2_visible WAIT_FOR group2_checked";
send INSERT INTO t1 VALUES ("con2"); send INSERT INTO t1 VALUES ("con2");
...@@ -70,6 +71,7 @@ SELECT * FROM t1 ORDER BY a; ...@@ -70,6 +71,7 @@ SELECT * FROM t1 ORDER BY a;
connection con5; connection con5;
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group3_con5"; SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group3_con5";
SET DEBUG_SYNC= "commit_after_get_LOCK_log SIGNAL con5_leader WAIT_FOR con6_queued"; SET DEBUG_SYNC= "commit_after_get_LOCK_log SIGNAL con5_leader WAIT_FOR con6_queued";
set DEBUG_SYNC= "now WAIT_FOR group2_running";
send INSERT INTO t1 VALUES ("con5"); send INSERT INTO t1 VALUES ("con5");
connection con6; connection con6;
......
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