diff options
-rw-r--r-- | mysql-test/suite/multi_source/gtid.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/multi_source/gtid.test | 3 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_gtid_crash.result | 24 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_gtid_crash.test | 15 |
4 files changed, 13 insertions, 35 deletions
diff --git a/mysql-test/suite/multi_source/gtid.result b/mysql-test/suite/multi_source/gtid.result index 28df2aa1fa9..126483725bc 100644 --- a/mysql-test/suite/multi_source/gtid.result +++ b/mysql-test/suite/multi_source/gtid.result @@ -1,12 +1,10 @@ CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.1', master_user='root'; CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.1', master_user='root'; -start all slaves; -Warnings: -Note 1937 SLAVE 'slave2' started -Note 1937 SLAVE 'slave1' started set default_master_connection = 'slave1'; +START SLAVE; include/wait_for_slave_to_start.inc set default_master_connection = 'slave2'; +START SLAVE; include/wait_for_slave_to_start.inc set default_master_connection = ''; CHANGE MASTER TO master_port=MYPORT_3, master_host='127.0.0.1', master_user='root'; diff --git a/mysql-test/suite/multi_source/gtid.test b/mysql-test/suite/multi_source/gtid.test index 19fb110d070..1352d4a3df4 100644 --- a/mysql-test/suite/multi_source/gtid.test +++ b/mysql-test/suite/multi_source/gtid.test @@ -15,10 +15,11 @@ eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root'; --replace_result $SERVER_MYPORT_2 MYPORT_2 eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root'; -start all slaves; set default_master_connection = 'slave1'; +START SLAVE; --source include/wait_for_slave_to_start.inc set default_master_connection = 'slave2'; +START SLAVE; --source include/wait_for_slave_to_start.inc set default_master_connection = ''; diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result index 4cc9dc1806b..92c48909fce 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result @@ -1,14 +1,14 @@ include/rpl_init.inc [topology=1->2] *** Test crashing master, causing slave IO thread to reconnect while SQL thread is running *** +call mtr.add_suppression("Checking table:"); +call mtr.add_suppression("client is using or hasn't closed the table properly"); +call mtr.add_suppression("Table .* is marked as crashed and should be repaired"); ALTER TABLE mysql.rpl_slave_state ENGINE=InnoDB; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, 0); include/stop_slave.inc CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, MASTER_GTID_POS=AUTO; -SET sql_log_bin=0; -FLUSH TABLES; -SET sql_log_bin=1; INSERT INTO t1 VALUES (2,1); INSERT INTO t1 VALUES (3,1); include/start_slave.inc @@ -26,9 +26,6 @@ SHOW BINLOG EVENTS IN 'master-bin.000001' LIMIT 1,1; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid_list # # [] CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; -SET sql_log_bin=0; -FLUSH TABLES; -SET sql_log_bin=1; include/start_slave.inc SET gtid_domain_id= 1; INSERT INTO t1 VALUES (1); @@ -67,37 +64,22 @@ include/stop_slave.inc SET GLOBAL debug_dbug="+d,inject_crash_before_write_rpl_slave_state"; START SLAVE; INSERT INTO t1 VALUES (4); -SET sql_log_bin=0; -FLUSH TABLES; -SET sql_log_bin=1; include/stop_slave.inc SET GLOBAL debug_dbug="+d,crash_commit_before"; START SLAVE; INSERT INTO t1 VALUES (5); -SET sql_log_bin=0; -FLUSH TABLES; -SET sql_log_bin=1; include/stop_slave.inc SET GLOBAL debug_dbug="+d,crash_commit_after"; START SLAVE; INSERT INTO t1 VALUES (6); -SET sql_log_bin=0; -FLUSH TABLES; -SET sql_log_bin=1; include/stop_slave.inc SET GLOBAL debug_dbug="+d,inject_crash_before_flush_rli"; START SLAVE; INSERT INTO t1 VALUES (7); -SET sql_log_bin=0; -FLUSH TABLES; -SET sql_log_bin=1; include/stop_slave.inc SET GLOBAL debug_dbug="+d,inject_crash_after_flush_rli"; START SLAVE; INSERT INTO t1 VALUES (8); -SET sql_log_bin=0; -FLUSH TABLES; -SET sql_log_bin=1; SELECT * FROM t1 ORDER BY a; a 1 diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash.test b/mysql-test/suite/rpl/t/rpl_gtid_crash.test index 7c340118d45..0f3f49948c2 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_crash.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_crash.test @@ -1,5 +1,7 @@ --source include/have_innodb.inc --source include/have_debug.inc +# Valgrind does not work well with test that crashes the server +--source include/not_valgrind.inc --let $rpl_topology=1->2 --source include/rpl_init.inc @@ -7,6 +9,10 @@ --echo *** Test crashing master, causing slave IO thread to reconnect while SQL thread is running *** --connection server_1 +call mtr.add_suppression("Checking table:"); +call mtr.add_suppression("client is using or hasn't closed the table properly"); +call mtr.add_suppression("Table .* is marked as crashed and should be repaired"); + ALTER TABLE mysql.rpl_slave_state ENGINE=InnoDB; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, 0); @@ -20,9 +26,6 @@ eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, MASTER_GTID_POS=AUTO; --connection server_1 -# Attempt to get tables closed and avoid "table ... is marked as crashed" -# messages in error log. -SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1; INSERT INTO t1 VALUES (2,1); INSERT INTO t1 VALUES (3,1); @@ -84,7 +87,6 @@ RESET MASTER; --replace_column 2 # 4 # 5 # SHOW BINLOG EVENTS IN 'master-bin.000001' LIMIT 1,1; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; -SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1; --connection server_2 --source include/start_slave.inc @@ -153,7 +155,6 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc -SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1; --let $wait_condition= SELECT COUNT(*) = 4 FROM t1 --source include/wait_condition.inc @@ -179,7 +180,6 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc -SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1; --let $wait_condition= SELECT COUNT(*) = 5 FROM t1 --source include/wait_condition.inc @@ -205,7 +205,6 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc -SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1; --let $wait_condition= SELECT COUNT(*) = 6 FROM t1 --source include/wait_condition.inc @@ -231,7 +230,6 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc -SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1; --let $wait_condition= SELECT COUNT(*) = 7 FROM t1 --source include/wait_condition.inc @@ -257,7 +255,6 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc -SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1; --let $wait_condition= SELECT COUNT(*) = 8 FROM t1 --source include/wait_condition.inc |