# TBF - difference in row level logging # Temp tables are not replicated in rbr, but it is still good to hit rbr with everthing # See SHOW SLAVE STATUS displays well after RESET SLAVE (it should display the # --master-* options from mysqld, as this is what is going to be used next time # slave threads will be started). In bug 985, it displayed old values (of before # RESET SLAVE). # See if slave crashes when doing a CREATE TEMPORARY TABLE twice, separated by # RESET SLAVE. -- source include/master-slave.inc sync_slave_with_master; --disable_query_log call mtr.add_suppression('Slave I/O: Get master BINLOG_CHECKSUM failed with error'); --enable_query_log let $status_items= Master_User, Master_Host; source include/show_slave_status.inc; source include/stop_slave.inc; --replace_column 2 #### CHANGE REPLICATION SOURCE to SOURCE_USER='test'; source include/show_slave_status.inc; reset slave; source include/show_slave_status.inc; --replace_column 2 #### CHANGE REPLICATION SOURCE to SOURCE_USER='root'; source include/start_slave.inc; sync_with_master; source include/show_slave_status.inc; # test of crash with temp tables & RESET SLAVE # (test to see if RESET SLAVE clears temp tables in memory and disk) source include/stop_slave.inc; reset slave; source include/start_slave.inc; connection master; create temporary table t1 (a int); sync_slave_with_master; source include/stop_slave.inc; reset slave; reset master; # clear GTIDs metadata so that create temporary table is replayed source include/start_slave.inc; sync_with_master; show status like 'slave_open_temp_tables'; connection master; drop temporary table if exists t1; sync_slave_with_master; # #Bug#34654 RESET SLAVE does not clear LAST_IO_Err* # # clearing the status source include/stop_slave.inc; reset slave; source include/check_slave_no_error.inc; # # verifying start slave resets Last_IO_Error and Last_IO_Errno. # --replace_column 2 #### CHANGE REPLICATION SOURCE to SOURCE_USER='impossible_user_name'; start slave; let $slave_io_errno= 1045; --source include/wait_for_slave_io_error.inc --source include/stop_slave_sql.inc --replace_column 2 #### CHANGE REPLICATION SOURCE to SOURCE_USER='root'; source include/start_slave.inc; source include/check_slave_no_error.inc; # # verifying reset slave resets Last_{IO,SQL}_Err{or,no} # --echo --echo Sync slave, else STOP SLAVE may complain about open temporary table. --echo --source include/rpl_connection_master.inc --source include/sync_slave_sql_with_master.inc --source include/stop_slave.inc --replace_column 2 #### CHANGE REPLICATION SOURCE to SOURCE_USER='impossible_user_name'; start slave; let $slave_io_errno= 1045; --source include/wait_for_slave_io_error.inc --source include/stop_slave_sql.inc reset slave; source include/check_slave_no_error.inc; --replace_column 2 #### CHANGE REPLICATION SOURCE to SOURCE_USER='root'; # # BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING MYSQL BUG#28796 # reset slave; --echo --echo Sync slave, else STOP SLAVE may complain about open temporary table. --echo --source include/start_slave.inc --source include/rpl_connection_master.inc --source include/sync_slave_sql_with_master.inc --source include/stop_slave.inc --let $_slave_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) --let $_slave_master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1) --let $_slave_master_port= query_get_value(SHOW SLAVE STATUS, Master_Port, 1) reset slave all; --error ER_BAD_SLAVE start slave; --let $_show_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) if ($_show_master_host != No such row) { die; } --replace_result $_slave_master_host MASTER_HOST $_slave_master_user MASTER_USER $_slave_master_port MASTER_PORT --replace_column 2 #### --eval CHANGE REPLICATION SOURCE TO SOURCE_HOST= '$_slave_master_host', SOURCE_USER= '$_slave_master_user', SOURCE_PORT= $_slave_master_port --source include/start_slave.inc # # Bug#27357189 MASTER_USER BECOMES 'TEST' IF IT IS EMPTY WHEN READ FROM REPO # # Clean all the previous info # Sync with the master so we delete the temporary table before stop. --source include/rpl_connection_master.inc --source include/sync_slave_sql_with_master.inc --source include/stop_slave.inc --let $rpl_reset_slave_all= 1 --source include/rpl_reset_slave.inc --echo # Configure the slave with an empty user --replace_result $MASTER_MYPORT MASTER_PORT --eval CHANGE REPLICATION SOURCE TO SOURCE_USER='', SOURCE_PORT=$MASTER_MYPORT, SOURCE_HOST='localhost' --echo # Issue a RESET SLAVE instruction and try to start the slave IO thread that will error out --let $rpl_reset_slave_all= 0 --source include/rpl_reset_slave.inc START SLAVE IO_THREAD; --let $slave_io_errno= convert_error(ER_SLAVE_FATAL_ERROR) --source include/wait_for_slave_io_error.inc --echo # Check the user is still empty --let $_user= `SELECT user_name FROM mysql.slave_master_info` --let $assert_cond= "$_user" = "" --let $assert_text= User_name in slave_master_info is empty --source include/assert.inc --echo # Cleanup --let $rpl_reset_slave_all= 1 --source include/rpl_reset_slave.inc --replace_result $MASTER_MYPORT MASTER_PORT --eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_PORT=$MASTER_MYPORT, SOURCE_USER='root' --source include/start_slave.inc call mtr.add_suppression("Slave I/O for channel '': Fatal error: Invalid .* username when attempting to connect to the master server*"); --source include/rpl_end.inc