Server IP : 172.67.216.182 / Your IP : 172.68.164.120 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 # # The aim of this test: # 1. To check that replicated FLUSH RELAY LOGS commands do not cause # errors when we have replication chains of several servers and # not all channels exist on all servers. #Skip on group replication runs --source include/not_group_replication_plugin.inc --source include/have_binlog_format_mixed.inc --echo # --echo # Set up replication chain S1->S2->S3. --echo # --let $rpl_topology= 1->2->3 --let $rpl_multi_source= 1 --source include/rpl_init.inc --echo # --echo # Assert that server 2 does have channel_1 and doesn't have channel_2. --echo # --connection server_2 --let $num= `select count(*) from performance_schema.replication_connection_configuration where channel_name="channel_1"` --let $assert_text= Server 2 does have a channel named "channel_1". --let $assert_cond= $num = 1; --source include/assert.inc --let $num= `select count(*) from performance_schema.replication_connection_configuration where channel_name="channel_2"` --let $assert_text= Server 2 doesn't have a channel named "channel_2". --let $assert_cond= $num = 0; --source include/assert.inc --echo # --echo # Flush relay logs for a nonexistent channel. --echo # A error will be returned. --echo # --error ER_SLAVE_CHANNEL_DOES_NOT_EXIST FLUSH RELAY LOGS FOR CHANNEL 'channel_2'; --echo # --echo # Assert that server 3 doesn't have channel_1 and does have channel_2. --echo # --connection server_3 --let $num= `select count(*) from performance_schema.replication_connection_configuration where channel_name="channel_1"` --let $assert_text= Server 3 doesn't have a channel named "channel_1". --let $assert_cond= $num = 0; --source include/assert.inc --let $num= `select count(*) from performance_schema.replication_connection_configuration where channel_name="channel_2"` --let $assert_text= Server 3 does have a channel named "channel_2". --let $assert_cond= $num = 1; --source include/assert.inc --echo # --echo # Flush all logs from server 2 and verify that we don't have --echo # errors on server 3. --echo # --connection server_2 FLUSH LOGS; --connection server_1 CREATE TABLE t1 (c1 INT); INSERT INTO t1 VALUES (1); --let $sync_slave_connection= server_2 --source include/sync_slave_sql_with_master.inc --let $num= `select count(*) from t1` --let $assert_text= Server 2 has one row on table t1. --let $assert_cond= $num = 1; --source include/assert.inc --let $sync_slave_connection= server_3 --source include/sync_slave_sql_with_master.inc --let $num= `select count(*) from t1` --let $assert_text= Server 3 has one row on table t1. --let $assert_cond= $num = 1; --source include/assert.inc --echo # --echo # Flush channel_1 relay logs from server 2 and verify that we --echo # don't have errors on server 3 (where channel_2 does not exist), --echo # despite a warning being logged and replication is working. --echo # --connection server_3 call mtr.add_suppression("Slave channel 'channel_1' does not exist."); --connection server_2 FLUSH RELAY LOGS FOR CHANNEL 'channel_1'; --connection server_1 INSERT INTO t1 VALUES (2); --let $sync_slave_connection= server_2 --source include/sync_slave_sql_with_master.inc --let $num= `select count(*) from t1` --let $assert_text= Server 2 has two rows on table t1. --let $assert_cond= $num = 2; --source include/assert.inc --let $sync_slave_connection= server_3 --source include/sync_slave_sql_with_master.inc --let $num= `select count(*) from t1` --let $assert_text= Server 3 has two rows on table t1. --let $assert_cond= $num = 2; --source include/assert.inc --echo # --echo # Clean up. --echo # --connection server_1 DROP TABLE t1; --let $sync_slave_connection= server_2 --source include/sync_slave_sql_with_master.inc --let $sync_slave_connection= server_3 --source include/sync_slave_sql_with_master.inc --let $rpl_skip_sync= 1 --source include/rpl_end.inc