Server IP : 172.67.216.182 / Your IP : 172.70.208.80 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 : |
--source include/not_group_replication_plugin.inc # There is no point in running this test in more # than once, ie, one for each binary log format. -- source include/have_binlog_format_row.inc -- source include/master-slave.inc # # BUG#43535: last_io_error in show slave status is confusing # --let $ts_regexp= [0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] ############# CHECKS SQL ERRORS ############# --let $field= Last_SQL_Error_Timestamp -- connection master CREATE TABLE t1 (a INT, b blob, PRIMARY KEY(b(512))); --source include/sync_slave_sql_with_master.inc # action: remove table on the slave to force SQL error DROP TABLE t1; -- connection master # action: drop the table on the master DROP TABLE t1; -- connection slave # action: now wait for the slave to stop because it cannot # remove a table that does not exist let $slave_sql_errno=1051; # ER_BAD_TABLE_ERROR call mtr.add_suppression("Slave SQL for channel '': .*Error .Unknown table .test.t1.. on query.* Error_code: 1051"); call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); -- source include/wait_for_slave_sql_error.inc --let $errts0= query_get_value("SHOW SLAVE STATUS", $field, 1) --let $assert_text= $field is not null and matches the expected format --let $assert_cond= `SELECT ("$errts0" REGEXP "$ts_regexp")` --source include/assert.inc # action: stop the slave (this should preserve the error) -- source include/stop_slave.inc --let $assert_cond= "$errts0" = "[SHOW SLAVE STATUS, $field, 1]" --let $assert_text= $field matches the one reported before stopping slave threads --source include/assert.inc -- connection slave # action: create the table again on the slave so that it resumes replication # correctly when we restart the slave CREATE TABLE t1 (a INT, b blob, PRIMARY KEY(b(512))); -- let $sql_errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1) -- echo Last_SQL_Errno: $sql_errno -- source include/start_slave.inc -- echo # assertion: show that the error is not reported anymore since replication -- echo # has resumed correctly let $slave_param= Last_SQL_Errno; let $slave_param_comparison= =; let $slave_param_value= 0; let $slave_error_message= Failed while waiting for slave to clear the SQL error after starting; source include/wait_for_slave_param.inc; ############# CHECKS IO ERRORS ############# --let $rpl_only_running_threads= 1 --source include/rpl_reset.inc --let $field= Last_IO_Error_Timestamp # mostly copied and extended from rpl_server_id1.test -- connection slave # replicate ourselves -- source include/stop_slave.inc -- replace_result $SLAVE_MYPORT SLAVE_PORT -- eval change master to master_port=$SLAVE_MYPORT START SLAVE; -- let $slave_param= Last_IO_Errno -- let $slave_param_value= 1593 -- source include/wait_for_slave_param.inc -- echo *** must be having the replicate-same-server-id IO thread error *** --let $errts0= query_get_value("SHOW SLAVE STATUS", $field, 1) --let $assert_text= $field is not null and matches the expected format --let $assert_cond= `SELECT ("$errts0" REGEXP "$ts_regexp")` --source include/assert.inc # action: stop the slave -- source include/stop_slave.inc --let $assert_cond= "$errts0" = "[SHOW SLAVE STATUS, $field, 1]" --let $assert_text= $field matches the one reported before stopping slave threads --source include/assert.inc # action: restore correct settings -- replace_result $MASTER_MYPORT MASTER_PORT -- eval change master to master_port=$MASTER_MYPORT -- let $io_errno= query_get_value("SHOW SLAVE STATUS", Last_IO_Errno, 1) -- echo Last_IO_Errno: $io_errno -- source include/start_slave.inc -- echo # assertion: show that no error is reported anymore let $slave_param= Last_IO_Errno; let $slave_param_comparison= =; let $slave_param_value= 0; let $slave_error_message= Failed while waiting for slave to clear the IO error after starting; source include/wait_for_slave_param.inc; --source include/rpl_end.inc