diff --git a/mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result b/mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result index b14f7b0154123..a3e98afa775a8 100644 --- a/mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result +++ b/mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result @@ -34,6 +34,7 @@ set debug_sync= "now wait_for sql_thread_run_lock_released"; # Validating that Last_SQL_Errno is cleared.. # ..success set debug_sync= "now signal sql_thread_continue"; +# Wait for debug_sync signal to have been received before issuing RESET set @@global.debug_dbug= @saved_dbug; set debug_sync= "RESET"; # Cleanup diff --git a/mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test b/mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test index f6dcfd91409f8..8b096902143b7 100644 --- a/mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test +++ b/mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test @@ -76,6 +76,10 @@ if ($last_error) set debug_sync= "now signal sql_thread_continue"; +--echo # Wait for debug_sync signal to have been received before issuing RESET +let $wait_condition= select count(*)=0 from information_schema.processlist where state like "debug sync point%"; +source include/wait_condition.inc; + set @@global.debug_dbug= @saved_dbug; set debug_sync= "RESET";