From 048cc420521b9187adcb89026c72601db0a07d01 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Jun 2012 10:42:55 +0200 Subject: [PATCH] MDEV-342: fix two race conditions in the test case that could occasionally cause spurious failures. --- mysql-test/suite/binlog/r/binlog_mdev342.result | 1 + mysql-test/suite/binlog/t/binlog_mdev342.test | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/mysql-test/suite/binlog/r/binlog_mdev342.result b/mysql-test/suite/binlog/r/binlog_mdev342.result index 2346ccc2e3d..0e1d8f8ac78 100644 --- a/mysql-test/suite/binlog/r/binlog_mdev342.result +++ b/mysql-test/suite/binlog/r/binlog_mdev342.result @@ -1,5 +1,6 @@ SET GLOBAL max_binlog_size= 4096; SET GLOBAL innodb_flush_log_at_trx_commit= 1; +RESET MASTER; CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb; SET DEBUG_SYNC= "binlog_open_before_update_index SIGNAL con1_ready WAIT_FOR con1_cont"; SET SESSION debug_dbug="+d,crash_create_critical_before_update_index"; diff --git a/mysql-test/suite/binlog/t/binlog_mdev342.test b/mysql-test/suite/binlog/t/binlog_mdev342.test index cae915b302b..02310b87a76 100644 --- a/mysql-test/suite/binlog/t/binlog_mdev342.test +++ b/mysql-test/suite/binlog/t/binlog_mdev342.test @@ -8,6 +8,7 @@ # (We do not need to restore these settings, as we crash the server). SET GLOBAL max_binlog_size= 4096; SET GLOBAL innodb_flush_log_at_trx_commit= 1; +RESET MASTER; CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb; @@ -35,6 +36,9 @@ SET DEBUG_SYNC= "now WAIT_FOR con2_ready"; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect wait-binlog_mdev342.test EOF +# If con1 manages to race ahead and crash, we can see the crash already in the +# SET DEBUG_SYNC statement, so need --error here also. +--error 0,2006,2013 SET DEBUG_SYNC= "now SIGNAL con1_cont"; connection con1; --error 2006,2013