summaryrefslogtreecommitdiff
path: root/mysql-test/suite/binlog/t/binlog_checkpoint.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/binlog/t/binlog_checkpoint.test')
-rw-r--r--mysql-test/suite/binlog/t/binlog_checkpoint.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/suite/binlog/t/binlog_checkpoint.test b/mysql-test/suite/binlog/t/binlog_checkpoint.test
index 557791c77e5..8c84e51c4df 100644
--- a/mysql-test/suite/binlog/t/binlog_checkpoint.test
+++ b/mysql-test/suite/binlog/t/binlog_checkpoint.test
@@ -71,6 +71,12 @@ SET DEBUG_SYNC= "now WAIT_FOR con2_ready";
--let $binlog_file= master-bin.000003
--source include/show_binlog_events.inc
+# We need to sync the test case with the background processing of the
+# commit checkpoint, otherwise we get nondeterministic results.
+SET DEBUG_SYNC= "RESET";
+SET @old_dbug= @@global.DEBUG_DBUG;
+SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed";
+
SET DEBUG_SYNC= "now SIGNAL con2_continue";
connection con2;
@@ -78,6 +84,12 @@ reap;
connection default;
--echo con1 is still pending, no new binlog checkpoint should have been logged.
+# Make sure commit checkpoint is processed before we check that no checkpoint
+# event has been binlogged.
+SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
+SET GLOBAL debug_dbug= @old_dbug;
+SET DEBUG_SYNC= "RESET";
+
--let $binlog_file= master-bin.000003
--source include/show_binlog_events.inc