Server IP : 172.67.216.182 / Your IP : 172.71.152.33 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/rpl/t/ |
Upload File : |
# ==== 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