From e2ff2885319e480477e8f7d2824065ee4f4363a6 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 May 2011 15:06:16 +0200 Subject: [PATCH] Fix buildbot failure in rpl_stop_slave.test. Problem was setting DEBUG_SYNC twice in a row too fast in the test case; this could cause the second setting to override the first before the code had time to react to the first, causing the signal to get lost. Fixed by waiting for the code to receive the first signal before overwriting it in the test case. --- mysql-test/suite/rpl/r/rpl_stop_slave.result | 1 + mysql-test/suite/rpl/t/rpl_stop_slave.test | 1 + sql/sql_repl.cc | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index ac5eacc7066..56199b003c5 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -168,6 +168,7 @@ STOP SLAVE; ROLLBACK; [connection master] SET DEBUG_SYNC= 'now SIGNAL signal.continue'; +SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; SET DEBUG_SYNC= 'RESET'; [connection slave] include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stop_slave.test index 8d2b26dd4ea..1502c694ea0 100644 --- a/mysql-test/suite/rpl/t/rpl_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test @@ -109,6 +109,7 @@ ROLLBACK; --source include/rpl_connection_master.inc SET DEBUG_SYNC= 'now SIGNAL signal.continue'; +SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; SET DEBUG_SYNC= 'RESET'; --source include/rpl_connection_slave.inc diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 418c2985f85..5038d02abca 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -571,6 +571,11 @@ impossible position"; DBUG_ASSERT(opt_debug_sync_timeout > 0); DBUG_ASSERT(!debug_sync_set_action(current_thd, STRING_WITH_LEN(act))); + const char act2[]= + "now " + "signal signal.continued"; + DBUG_ASSERT(!debug_sync_set_action(current_thd, + STRING_WITH_LEN(act2))); } });