summaryrefslogtreecommitdiff
path: root/mysql-test/extra
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2012-12-17 12:49:11 +0100
committerunknown <knielsen@knielsen-hq.org>2012-12-17 12:49:11 +0100
commitcd0970c4808b80f33516e9e47e0bb62dae1e6bd5 (patch)
tree31b55b1341491021dbdcfc8e9060af59fb28435b /mysql-test/extra
parent7760efad74140680b1eefaf2172b0fa26f7b1146 (diff)
downloadmariadb-git-cd0970c4808b80f33516e9e47e0bb62dae1e6bd5.tar.gz
MDEV-532: Fix some race conditions in test cases.
With MDEV-532, the binlog_checkpoint event is logged asynchronously from a binlog background thread. This causes some sporadic failures in some test cases whose output depends on order of events in binlog. Fix using an include file that waits until the binlog checkpoint event has been logged before proceeding with the test case.
Diffstat (limited to 'mysql-test/extra')
-rw-r--r--mysql-test/extra/rpl_tests/rpl_insert_delayed.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_log.test1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc2
3 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
index 2dbba38166b..3d7d3600199 100644
--- a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
+++ b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
@@ -94,8 +94,10 @@ if (`SELECT @@global.binlog_format = 'STATEMENT'`)
#flush the logs before the test
connection slave;
FLUSH LOGS;
+ source include/wait_for_binlog_checkpoint.inc;
connection master;
FLUSH LOGS;
+ source include/wait_for_binlog_checkpoint.inc;
}
CREATE TABLE t1(a int, UNIQUE(a));
diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test
index 892d926a156..961996bb265 100644
--- a/mysql-test/extra/rpl_tests/rpl_log.test
+++ b/mysql-test/extra/rpl_tests/rpl_log.test
@@ -43,6 +43,7 @@ let $binlog_limit= 1,4;
source include/show_binlog_events.inc;
let $binlog_limit=;
flush logs;
+--source include/wait_for_binlog_checkpoint.inc
# We need an extra update before doing save_master_pos.
# Otherwise, an unlikely scenario may occur:
diff --git a/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc b/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc
index a56e08ece42..d0a905d3b7d 100644
--- a/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc
+++ b/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc
@@ -41,8 +41,10 @@ INSERT INTO t1 VALUES (3);
#
FLUSH LOGS;
+--source include/wait_for_binlog_checkpoint.inc
-- connection master
FLUSH LOGS;
+--source include/wait_for_binlog_checkpoint.inc
DROP TABLE t1;
--let $is_relay_log= 0