config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/t/rpl_change_master_open_temp_tables.test

# ==== Purpose ====
#
# This test script serves as the functionality testing for
# WL#6120- Change master without stopping Slave threads.
#
# This test script does the following:

#  - Temporary table(s) should NOT be dropped if applier is running during
#    CHANGE MASTER.
#  - If there are open temporary tables and there is a STOP SLAVE/
#    STOP SLAVE[IO_THREAD/SQL_THREAD]there should be a warning.
#  - If there are open temporary tables and there is a CHANGE MASTER,
#    there should be a warning.
#  - There is no warning if the change master option only changes connection
#    or execution configuration.
#
#  ==== Related Worklog(s) And Bug(s)====
#
#  WL#6120- Change master without stopping Slave threads.
#

--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc

--echo
--echo # create a temporary table, replicate at slave for all the tests below.
--echo

CREATE TEMPORARY TABLE t1(a int);
--source include/sync_slave_sql_with_master.inc

--echo
--echo # Make sure STOP SLAVE generates a warning.
--echo

STOP SLAVE;
--source include/wait_for_slave_to_stop.inc

--echo
--echo # Make sure STOP SLAVE SQL_THREAD generates a warning.
--echo

STOP SLAVE SQL_THREAD;
--source include/wait_for_slave_sql_to_stop.inc

--echo
--echo # Make sure STOP SLAVE IO_THREAD generates a warning.
--echo

STOP SLAVE IO_THREAD;
--source include/wait_for_slave_io_to_stop.inc

--echo
--echo # No warning here since we are changing a configuration parameter only.
--echo

CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD= 10;

--echo
--echo # Use of (master/relay)log_file/log_pos options should generate a warning.
--echo

--let $save_autoposition= query_get_value(SHOW SLAVE STATUS, Auto_Position, 1)
CHANGE MASTER TO MASTER_AUTO_POSITION= 0;

let $master_log_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1);
replace_result $master_log_file MASTER_LOG_FILE;
eval CHANGE MASTER TO MASTER_LOG_FILE= '$master_log_file';

let $master_log_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
replace_result $master_log_pos MASTER_LOG_POS;
eval CHANGE MASTER TO MASTER_LOG_POS= $master_log_pos;

let $relay_log_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
replace_result $relay_log_file RELAY_LOG_FILE;
eval CHANGE MASTER TO RELAY_LOG_FILE= '$relay_log_file';

let $relay_log_pos= query_get_value(SHOW SLAVE STATUS, Relay_Log_Pos, 1);
replace_result $relay_log_pos RELAY_LOG_POS;
--disable_warnings
eval CHANGE MASTER TO RELAY_LOG_POS= $relay_log_pos;
--enable_warnings
# Do SHOW WARINGS explicitly to avoid replace_result affecting the output
SHOW WARNINGS;

--replace_result $save_autoposition SAVE_AUTOPOSITION
eval CHANGE MASTER TO MASTER_AUTO_POSITION= $save_autoposition;

--echo
--echo # cleanup
--echo

--source include/start_slave.inc
--connection master
DROP TEMPORARY TABLE t1;

--source include/rpl_end.inc

Man Man