From 0450623f73db36c1ba4857e202361401a9706e53 Mon Sep 17 00:00:00 2001 From: Kristian Nielsen Date: Tue, 2 Dec 2014 12:10:21 +0100 Subject: [PATCH] MDEV-7236: rpl.rpl_gtid_basic failed in buildbot with wait_condition timeout Fix rare failures in test case rpl.rpl_gtid_basic: - Add another possible error code when a connection is killed. - Make sure that the IO thread has had time to complete its stop after START SLAVE UNTIL. Otherwise, START SLAVE might run before IO thread stop, leaving the test case with a stopped IO thread that eventually causes a wait timeout. --- mysql-test/suite/rpl/r/rpl_gtid_basic.result | 4 ++-- mysql-test/suite/rpl/t/rpl_gtid_basic.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result index e8e5bf36f84..465cc875af0 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result @@ -286,7 +286,7 @@ INSERT INTO t1 VALUES (4); master_gtid_wait('2-1-2') 0 KILL CONNECTION KILL_ID; -ERROR HY000: Lost connection to MySQL server during query +Got one of the listed errors SET gtid_domain_id=1; SET gtid_seq_no=4; INSERT INTO t1 VALUES (5); @@ -386,7 +386,7 @@ SET GLOBAL slave_ddl_exec_mode=STRICT; SET sql_slave_skip_counter=1; START SLAVE UNTIL master_gtid_pos="3-1-100"; include/sync_with_master_gtid.inc -include/wait_for_slave_sql_to_stop.inc +include/wait_for_slave_to_stop.inc SELECT * FROM t2; ERROR 42S02: Table 'test.t2' doesn't exist SELECT IF(LOCATE("3-1-100", @@GLOBAL.gtid_slave_pos)>0, "Ok", CONCAT("ERROR! expected GTID 3-1-100 not found in gtid_slave_pos: ", @@GLOBAL.gtid_slave_pos)) AS status; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_basic.test b/mysql-test/suite/rpl/t/rpl_gtid_basic.test index 5ecff519aef..19f90fce197 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_basic.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_basic.test @@ -334,7 +334,7 @@ reap; eval KILL CONNECTION $kill2_id; --connection s6 ---error 2013 +--error 2013,ER_CONNECTION_KILLED reap; --connection server_1 @@ -456,7 +456,7 @@ SET sql_slave_skip_counter=1; START SLAVE UNTIL master_gtid_pos="3-1-100"; --let $master_pos=3-1-100 --source include/sync_with_master_gtid.inc ---source include/wait_for_slave_sql_to_stop.inc +--source include/wait_for_slave_to_stop.inc --error ER_NO_SUCH_TABLE SELECT * FROM t2; SELECT IF(LOCATE("3-1-100", @@GLOBAL.gtid_slave_pos)>0, "Ok", CONCAT("ERROR! expected GTID 3-1-100 not found in gtid_slave_pos: ", @@GLOBAL.gtid_slave_pos)) AS status;