diff options
Diffstat (limited to 'mysql-test/suite/rpl/include')
9 files changed, 46 insertions, 10 deletions
diff --git a/mysql-test/suite/rpl/include/mdev-31448_conservative.inc b/mysql-test/suite/rpl/include/mdev-31448_conservative.inc index 3db5a000..e479901f 100644 --- a/mysql-test/suite/rpl/include/mdev-31448_conservative.inc +++ b/mysql-test/suite/rpl/include/mdev-31448_conservative.inc @@ -36,7 +36,8 @@ insert into t1 values (3); --connection slave --source include/start_slave.inc ---let $wait_condition= SELECT count(*)=1 FROM information_schema.processlist WHERE state LIKE 'Update_rows_log_event::find_row(-1)%' and command LIKE 'Slave_worker'; +# Wildcard for `state` as it depends on whether WSREP is compiled in or not. +--let $wait_condition= SELECT count(*)=1 FROM information_schema.processlist WHERE state LIKE 'Update_rows_log_event::find_row(%' and command LIKE 'Slave_worker'; --source include/wait_condition.inc --let $wait_condition= SELECT count(*)=1 FROM information_schema.processlist WHERE state LIKE 'Waiting for prior transaction to commit%' and command LIKE 'Slave_worker'; --source include/wait_condition.inc @@ -50,8 +51,8 @@ insert into t1 values (3); commit; --connection slave ---let $slave_timeout=1032 ---source include/wait_for_slave_sql_to_stop.inc +--let $slave_sql_errno=1032 +--source include/wait_for_slave_sql_error.inc update t1 set a=1 where a=2; set @@global.slave_parallel_threads = @save.slave_parallel_threads; diff --git a/mysql-test/suite/rpl/include/mdev-31448_optimistic.inc b/mysql-test/suite/rpl/include/mdev-31448_optimistic.inc index 22cee6b3..c561e298 100644 --- a/mysql-test/suite/rpl/include/mdev-31448_optimistic.inc +++ b/mysql-test/suite/rpl/include/mdev-31448_optimistic.inc @@ -55,7 +55,8 @@ drop table t2; --source include/start_slave.inc --echo # wait for T1 ---let $wait_condition= SELECT count(*)=1 FROM information_schema.processlist WHERE state LIKE 'Update_rows_log_event::find_row(-1)%' and command LIKE 'Slave_worker'; +# Wildcard for `state` as it depends on whether WSREP is compiled in or not. +--let $wait_condition= SELECT count(*)=1 FROM information_schema.processlist WHERE state LIKE 'Update_rows_log_event::find_row(%' and command LIKE 'Slave_worker'; --source include/wait_condition.inc --echo # wait for T2 @@ -75,8 +76,8 @@ drop table t2; commit; --connection slave ---let $slave_timeout=1032 ---source include/wait_for_slave_sql_to_stop.inc +--let $slave_sql_errno=1032 +--source include/wait_for_slave_sql_error.inc update t1 set a=1 where a=2; set @@global.slave_parallel_threads = @save.slave_parallel_threads; diff --git a/mysql-test/suite/rpl/include/mysqlbinlog_slave_consistency.inc b/mysql-test/suite/rpl/include/mysqlbinlog_slave_consistency.inc index 48e4399d..b571c24e 100644 --- a/mysql-test/suite/rpl/include/mysqlbinlog_slave_consistency.inc +++ b/mysql-test/suite/rpl/include/mysqlbinlog_slave_consistency.inc @@ -128,6 +128,7 @@ if (!$slave_sql_errno) } --echo # Stop $con2 so it stops receiving $con1 events. +--let $rpl_allow_error= 1 --source include/stop_slave.inc --connection $con1 diff --git a/mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test b/mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test index 2634a602..77b969fc 100644 --- a/mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/include/rpl_binlog_max_cache_size.test @@ -418,6 +418,8 @@ while ($n) COMMIT; --connection slave +# Multi-statement transaction raised ER_TRANS_CACHE_FULL (4096=128x32) +# that will stop SQL slave thread --let $slave_sql_errno= 1197 if (`SELECT @@binlog_format = 'ROW'`) { @@ -437,7 +439,8 @@ source include/show_binlog_events.inc; --replace_result $old_binlog_stmt_cache_size ORIGINAL_VALUE --eval SET GLOBAL binlog_stmt_cache_size= $old_binlog_stmt_cache_size -source include/stop_slave.inc; +# SQL slave is stopped, stop only IO thread +source include/stop_slave_io.inc; source include/start_slave.inc; connection master; diff --git a/mysql-test/suite/rpl/include/rpl_change_master_demote.inc b/mysql-test/suite/rpl/include/rpl_change_master_demote.inc index 4c563454..932a2b87 100644 --- a/mysql-test/suite/rpl/include/rpl_change_master_demote.inc +++ b/mysql-test/suite/rpl/include/rpl_change_master_demote.inc @@ -85,5 +85,16 @@ SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHER --eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$MASTER_MYPORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 --source include/start_slave.inc +# Ensure master is ready to start sending new transactions. That is, because +# the master does not have log_slave_updates, the slave's transactions of +# repl_t are not binlogged, and its state is behind. If the master binlogs +# any new transactions before the slaves connection is matured, +# ER_GTID_POSITION_NOT_FOUND_IN_BINLOG2 can be reported to the slave +# FIXME: We shouldn't need to do this, rather, the master should use +# log-slave-updates and gtid-strict-mode +--connection master +--let $wait_condition= SELECT COUNT(*) > 0 FROM information_schema.processlist WHERE State like '%Master has sent all binlog to slave%' +--source include/wait_condition.inc + --let $include_filename= rpl_change_master_demote.inc --source include/end_include_file.inc diff --git a/mysql-test/suite/rpl/include/rpl_parallel_29322.inc b/mysql-test/suite/rpl/include/rpl_parallel_29322.inc index 96d75f33..a8b729d0 100644 --- a/mysql-test/suite/rpl/include/rpl_parallel_29322.inc +++ b/mysql-test/suite/rpl/include/rpl_parallel_29322.inc @@ -67,6 +67,17 @@ if ($same_version_binlogs) if (!$same_version_binlogs) { + # Make sure the dump thread is gone before moving around binlog files. Else + # it might see an empty file and give error (MDEV-29816). + --let $dump_thrid= `Select id FROM information_schema.processlist WHERE Command='Binlog Dump'` + if ($dump_thrid) { + --disable_query_log + --error 0,ER_NO_SUCH_THREAD + eval KILL CONNECTION $dump_thrid; + --enable_query_log + --let $wait_condition= SELECT COUNT(*)=0 FROM information_schema.processlist WHERE Command='Binlog Dump' + --source include/wait_condition.inc + } --move_file $datadir/master-bin.000002 $datadir/master-bin.000002.sav --copy_file $MYSQL_TEST_DIR/std_data/mdev29078-mysql-bin.000001 $datadir/master-bin.000002 --exec $MYSQL_BINLOG --short-form $datadir/master-bin.000002 diff --git a/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc b/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc index 4726bbe1..f9c007b4 100644 --- a/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc +++ b/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc @@ -75,17 +75,22 @@ EOF --connection server_1 DROP TABLE t1; +# Slaves IO thread will receive the disconnect error when master was shutdown +# so we are allowing error on start. --connection server_2 --disable_warnings +--let rpl_allow_error=1 --source include/start_slave.inc --enable_warnings --connection server_3 --disable_warnings +--let rpl_allow_error=1 --source include/start_slave.inc --enable_warnings --connection server_4 --disable_warnings +--let rpl_allow_error=1 --source include/start_slave.inc --enable_warnings diff --git a/mysql-test/suite/rpl/include/rpl_start_stop_slave.test b/mysql-test/suite/rpl/include/rpl_start_stop_slave.test index ae5f8361..56b04494 100644 --- a/mysql-test/suite/rpl/include/rpl_start_stop_slave.test +++ b/mysql-test/suite/rpl/include/rpl_start_stop_slave.test @@ -207,7 +207,7 @@ START SLAVE; --let $status_items= Last_IO_Errno, Last_IO_Error --source include/show_slave_status.inc ---source include/stop_slave.inc +--source include/stop_slave_sql.inc RESET SLAVE; --connection master diff --git a/mysql-test/suite/rpl/include/rpl_stop_middle_group.test b/mysql-test/suite/rpl/include/rpl_stop_middle_group.test index ac01fb04..6bc872ca 100644 --- a/mysql-test/suite/rpl/include/rpl_stop_middle_group.test +++ b/mysql-test/suite/rpl/include/rpl_stop_middle_group.test @@ -82,7 +82,9 @@ connection slave; # slave will catch the killed status, won't shut down immediately # but does it eventually having the whole group unfinished (not committed) -source include/wait_for_slave_sql_to_stop.inc; +# ER_SLAVE_FATAL_ERROR +--let slave_sql_errno= 1593 +source include/wait_for_slave_sql_error.inc; # checking: the error and group unfinished @@ -120,7 +122,8 @@ connection slave; # but does it eventually having the whole group unfinished (not committed) # -source include/wait_for_slave_sql_to_stop.inc; +--let slave_sql_errno= 1593 +source include/wait_for_slave_sql_error.inc; # checking: the error and group unfinished |