Server IP : 172.67.216.182 / Your IP : 108.162.226.242 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 : |
############################################################################### # Bug#19021091: RELAY_LOG_RECOVERY KO WHEN CHANGE MASTER WITHOUT FILE AND # SQL_THREAD NOT STARTED # # Problem: # ======== # If, on an empty database: # - CHANGE MASTER TO without a MASTER_FILE and MASTER_POS is used, # - the IO_THREAD is started WITHOUT starting the SQL_THREAD, # - MySQL crashed, # - MySQL is restarted with relay_log_recovery = 1. # # Crash recovery will not work as expected: # - The IO_THREAD position will NOT be initialized to the SQL_THREAD position, # - SQL_THREAD position will NOT be initialized to the new relay log. # # It looks like, when the SQL_THREAD does not have a Relay_Master_Log_File, # relay_log_recovery does not work. # # Test: # ===== # Use master and slave info repositories to be tables and set # relay-log-recovery=1. Stop the slave, execute a CREATE DATABASE statement on # the master. Execute a CHANGE MASTER statement on slave without a MASTER_FILE # and MASTER_POS. Start IO thread alone. Crash the slave and restart it. When # slave is restarted with bug, sql thread will not be able to start. It will fail # with an error saying the database already exists. Post fix sql thread will # read positions from the first rotate event that is received from the master. # Sql thread will start without any error. ############################################################################### --source include/not_group_replication_plugin.inc --source include/master-slave.inc --source include/force_restart.inc --source include/rpl_connection_slave.inc call mtr.add_suppression("Recovery from master pos .*"); --source include/rpl_connection_slave.inc --source include/stop_slave.inc --source include/rpl_connection_master.inc CREATE DATABASE test_jfg; --source include/rpl_connection_slave.inc --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 2 #### --eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root' START SLAVE IO_THREAD; source include/wait_for_slave_io_to_start.inc; --source include/rpl_connection_master.inc source include/sync_slave_io_with_master.inc; # Restart the slave server --let $rpl_server_number= 2 --let $rpl_force_stop= 1 --let $rpl_server_parameters=--skip_slave_start=FALSE --master-info-repository=TABLE --relay-log-info-repository=TABLE --relay-log-recovery=1 --source include/rpl_restart_server.inc # With bug sql thread will not be able to start it will fail with error 1007 # Slave: Can't create database 'test_jfg'; database exists Error_code: 1007 source include/wait_for_slave_sql_to_start.inc; --source include/rpl_connection_master.inc DROP DATABASE test_jfg; --source include/rpl_end.inc