Server IP : 104.21.38.3 / Your IP : 162.158.106.124 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 : |
# WL#1697: Multisource replication # # Test the behaviour when sql_slave_skip_counter is set # # BUG#19634753: WL1697: IF SQL_SLAVE_SKIP_COUNTER > 0, IO_THREAD(S) ARE # NOT ABLE TO START # BUG#20400518 # The behavior for MySQL 5.7 should be: # # sql_slave_skip_counter can be set at anytime, even some channels are running. # Setting sql_slave_skip_counter doesn't effect any running channel. Its value # only effects the first channel starting after the # 'SET GLOBAL sql_slave_skip_counter'. After the channel starts, # sql_slave_skip_counter will be reset to 0 automatically. # # The process like: # # SET GLOBAL sql_slave_skip_counter = 5; # START SLAVE FOR CHANNEL 'ch1'; # # SHOW SLAVE STATUS FOR CHANNEL 'channel_1'; # Skip_count item will be 5. # # SELECT @@GLOBAL.sql_slave_skip_counter; # It will be 0. # # # START SLAVE will report the error ER_SLAVE_CHANNEL_SQL_SKIP_COUNTER if it is # starting more than one channels. # # #Skip on group replication runs --source include/not_group_replication_plugin.inc --source include/have_binlog_format_mixed.inc --source include/not_gtid_enabled.inc --echo # --echo # set up masters server_1 and server_3 with server_2 being a slave. --echo #. --let $rpl_multi_source= 1 --let $rpl_topology= 1->2,3->2 --source include/rpl_init.inc # On slave --let $rpl_connection_name= server_2 --source include/rpl_connection.inc call mtr.add_suppression("Slave: Could not start slave for channel"); --echo # --echo # Verify that Setting sql_slave_skip_counter doesn't effect running --echo # channels --echo # SET GLOBAL sql_slave_skip_counter= 1; --let $skip_counter= query_get_value(SHOW SLAVE STATUS FOR CHANNEL 'channel_1', Skip_Counter, 1) --let $assert_text= check that channel_1's Skip_Counter is 0. --echo $skip_counter --let $assert_cond= $skip_counter=0 --source include/assert.inc # stop SQL THREAD for all channels STOP SLAVE SQL_THREAD; --let $rpl_source_file= include/wait_for_slave_sql_to_stop.inc --source include/rpl_for_each_connection.inc --echo # --echo # Verify that START SLAVE FOR CHANNEL will copy sql_slave_skip_counter's --echo # value to the channel and reset sql_slave_skip_counter to 0 --echo # # first stop the channels --let $rpl_connection_name= server_2 --source include/rpl_connection.inc --source include/stop_slave.inc --let $rpl_channel_name= channel_1 --source include/start_slave.inc --let $skip_counter= query_get_value(SHOW SLAVE STATUS FOR CHANNEL 'channel_1', Skip_Counter, 1) --let $assert_text= check that channel_1's Skip_Counter is 0. --echo $skip_counter --let $assert_cond= $skip_counter= 1 --source include/assert.inc --let $assert_text= check that sql_slave_skip_counter is 0 --let $assert_cond= @@GLOBAL.sql_slave_skip_counter = 0 --source include/assert.inc --echo # --echo # START SLAVE [SQL_THREAD] will fail when sql_slave_skip_counter is 1 --echo # and there are more than one channels --echo # SET GLOBAL sql_slave_skip_counter = 1; --error ER_SLAVE_CHANNEL_SQL_SKIP_COUNTER START SLAVE; --error ER_SLAVE_CHANNEL_SQL_SKIP_COUNTER START SLAVE SQL_THREAD; --echo # --echo # START SLAVE IO_THREAD should not fail. --echo # --disable_warnings START SLAVE IO_THREAD; --enable_warnings --let $rpl_source_file= include/wait_for_slave_io_to_start.inc --source include/rpl_for_each_connection.inc --let $assert_text= All two IO threads are running after START SLAVE IO_THREAD --let $assert_cond= [SELECT COUNT(*) FROM performance_schema.replication_connection_status WHERE Service_State="ON"] = 2; --source include/assert.inc SET GLOBAL sql_slave_skip_counter= 0; # End MSR setup. --let $rpl_skip_sync= 1 --let $rpl_only_running_threads= 1 --source include/rpl_end.inc