summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2011-04-14 13:23:02 +0200
committerunknown <knielsen@knielsen-hq.org>2011-04-14 13:23:02 +0200
commitd02d52629d2eda10a50079001a79d50bf3d528cd (patch)
treeb227a7a3f4b843144d1c5055cd41676dd20bf27e /mysql-test
parent86008e0ca2b864f1ab7a30e496d7c67c8fce06c2 (diff)
downloadmariadb-git-d02d52629d2eda10a50079001a79d50bf3d528cd.tar.gz
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.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/innodb_plugin/r/group_commit.result2
-rw-r--r--mysql-test/suite/innodb_plugin/t/group_commit.test2
2 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_plugin/r/group_commit.result b/mysql-test/suite/innodb_plugin/r/group_commit.result
index 9e80dc6da6e..1009a83637f 100644
--- a/mysql-test/suite/innodb_plugin/r/group_commit.result
+++ b/mysql-test/suite/innodb_plugin/r/group_commit.result
@@ -7,6 +7,7 @@ SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL group1_running WAI
INSERT INTO t1 VALUES ("con1");
set DEBUG_SYNC= "now WAIT_FOR group1_running";
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_group_run_commit_ordered SIGNAL group2_visible WAIT_FOR group2_checked";
INSERT INTO t1 VALUES ("con2");
@@ -26,6 +27,7 @@ a
con1
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= "now WAIT_FOR group2_running";
INSERT INTO t1 VALUES ("con5");
SET DEBUG_SYNC= "now WAIT_FOR con5_leader";
SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL con6_queued";
diff --git a/mysql-test/suite/innodb_plugin/t/group_commit.test b/mysql-test/suite/innodb_plugin/t/group_commit.test
index 4c60b7de331..6a541f7b068 100644
--- a/mysql-test/suite/innodb_plugin/t/group_commit.test
+++ b/mysql-test/suite/innodb_plugin/t/group_commit.test
@@ -37,6 +37,7 @@ send INSERT INTO t1 VALUES ("con1");
connection con2;
set DEBUG_SYNC= "now WAIT_FOR group1_running";
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_group_run_commit_ordered SIGNAL group2_visible WAIT_FOR group2_checked";
send INSERT INTO t1 VALUES ("con2");
@@ -70,6 +71,7 @@ SELECT * FROM t1 ORDER BY a;
connection 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= "now WAIT_FOR group2_running";
send INSERT INTO t1 VALUES ("con5");
connection con6;