From 545d740ce6fb8861676f085e605388d4a6564a74 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 21 Mar 2012 15:41:20 +0100 Subject: [PATCH] Fix race condition in rpl_stop_start_slave. after kill connection, wait until it is gone in processlist --- mysql-test/suite/rpl/t/rpl_start_stop_slave.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test index ffe346d9731..c9c8f043668 100644 --- a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test @@ -28,7 +28,8 @@ set @time_before_kill := (select CURRENT_TIMESTAMP); --replace_regex /kill [0-9]*/kill / --eval kill $connection_id - +let $wait_condition= SELECT COUNT(*) = 0 FROM information_schema.processlist where id=$connection_id; +--source include/wait_condition.inc set @time_after_kill := (select CURRENT_TIMESTAMP); --echo [Time after the query] @@ -38,10 +39,9 @@ if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`) --echo # assert : The difference between the timestamps 'time_after_kill' and 'time_before_kill' should be less than 60sec. --die } - --echo [Killing of the slave IO thread was successful] ---disable_warnings + START SLAVE IO_THREAD; ---enable_warnings + # End of test --source include/rpl_end.inc