Server IP : 104.21.38.3 / Your IP : 172.70.147.5 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 ==== # # Bug#18091217 Slave I/O thread won't attempt auto reconnect to the master / error-code 1159 # # The slave receiver thread stops due to the 'ER_NET_READ_INTERRUPTED' # or 'ER_NET_WRITE_INTERRUPTED' error is encountered while getting # timestamp, server id from master, setting @master_heartbeat_period # and so on. # # To fix the problem, we fix to handle the 'ER_NET_READ_INTERRUPTED' # and 'ER_NET_WRITE_INTERRUPTED' errors as transient network errors. # Then the slave receiver thread attempts to automatically reconnect # to the master on these errors. # # Steps to reproduce: # 1) Log on slave, stop slave threads. # 2) Active injected error during getting server id from master # 3) Start slave theads to verify that their is no error happened. # --source include/master-slave.inc # The error injection works only with debug facilities. --source include/have_debug.inc --source include/have_debug_sync.inc # The test is not supposed to have any binlog affairs. # Hence it's enough to run only with one binlog format --source include/have_binlog_format_mixed.inc --source include/rpl_connection_slave.inc call mtr.add_suppression("Slave I/O .*: Master command COM_REGISTER_SLAVE failed: .*"); SET @debug_saved=@@global.debug; --source include/stop_slave.inc --source include/rpl_connection_master.inc CREATE TABLE t1 (c1 INT); DROP TABLE t1; --source include/rpl_connection_slave.inc --echo # --echo # Active injected error during getting server id from master --echo # SET GLOBAL DEBUG='d,get_master_server_id.ER_NET_READ_INTERRUPTED'; START SLAVE; # Crash if error happens during getting server id from master --let $rpl_allow_error= 0 --source include/wait_for_slave_io_to_start.inc --source include/rpl_connection_master.inc --source include/sync_slave_io_with_master.inc --let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err --let $assert_only_after= CURRENT_TEST: rpl.rpl_check_net_interrupted_error --let $assert_count= 0 --let $assert_select= fatal error is encountered when it try to get the value of SERVER_ID variable from master --let $assert_text= Make sure there is not the error "fatal error is encountered when it try to get the value of SERVER_ID variable from master" in slave's error log. --source include/assert_grep.inc --let $assert_count= 1 --let $assert_select= Get master SERVER_ID failed with error --let $assert_text= Make sure there is the warning "Get master SERVER_ID failed with error" in slave's error log. --source include/assert_grep.inc --source include/stop_slave.inc SET GLOBAL DEBUG= @save_debug; # Cleanup --source include/start_slave.inc --let $assert_file= --let $assert_only_after= --let $assert_count= --let $assert_select= --let $assert_text= --source include/rpl_end.inc