403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.71.124.69
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/rpl/t/rpl_multi_source_cmd_errors.test
# WL#1697: Multisource replication
#
#  Test the error conditions for a command.
#
# 1. When Multiple channels exist and FOR CHANNEL clause
#    is not issued, then certain COMMANDS shall fail.
# 2. When a non existent channel is provided as input,
#    certain commands shall fail
# 3. CHANGE MASTER errors related to Channel as input.
#

#Skip on group replication runs
--source include/not_group_replication_plugin.inc
--source include/have_binlog_format_mixed.inc
--source include/have_debug.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

# Multisource replication is already setup.

# On slave
--let $rpl_connection_name= server_2
--source include/rpl_connection.inc
--echo #
--echo #  1. Test ER_SLAVE_MULTIPLE_CHANNELS_CMD
--echo #
--error ER_SLAVE_MULTIPLE_CHANNELS_CMD
CHANGE MASTER TO MASTER_USER = "root";

--error ER_SLAVE_MULTIPLE_CHANNELS_CMD
SHOW RELAYLOG EVENTS;

--error ER_SLAVE_MULTIPLE_CHANNELS_CMD
SELECT MASTER_POS_WAIT("dummy-bin.000001", 4);

--error ER_SLAVE_MULTIPLE_CHANNELS_CMD
START SLAVE UNTIL MASTER_LOG_FILE = "dummy-bin.0000001", MASTER_LOG_POS = 1729

#--error ER_SLAVE_MULTIPLE_CHANNELS_CMD
#SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS("1111-1111-1111-1111:1");

--error ER_SLAVE_MULTIPLE_CHANNELS_CMD
START SLAVE UNTIL MASTER_LOG_FILE = "dummy-bin.000001", MASTER_LOG_POS = 4;


--echo #
--echo # 2. Test errors of commands on an invalid channel
--echo #
--error ER_SLAVE_CHANNEL_DOES_NOT_EXIST
START SLAVE FOR CHANNEL "non_existent";

--error ER_SLAVE_CHANNEL_DOES_NOT_EXIST
STOP SLAVE FOR CHANNEL "non_existent";

--error ER_SLAVE_CHANNEL_DOES_NOT_EXIST
SHOW RELAYLOG EVENTS FOR CHANNEL "non_existent";

--error ER_SLAVE_CHANNEL_DOES_NOT_EXIST
RESET SLAVE FOR CHANNEL "non_existent";

--error ER_SLAVE_CHANNEL_DOES_NOT_EXIST
FLUSH RELAY LOGS FOR CHANNEL "non_existent";

--echo # Following wait functions shall return for a non_existnent channels
SELECT MASTER_POS_WAIT("dummy-bin.00001",4, 3, "non_existtent");

SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS("1111-1111-1111-1111:1", 2, "non_existent");

--echo #
--echo #  3a) Test that proper error messages are sent out when invalid
--echo #      channel names are given for change master command.
--echo #
--error ER_SLAVE_CHANNEL_NAME_INVALID_OR_TOO_LONG
CHANGE MASTER TO MASTER_HOST = "127.0.0.1", MASTER_USER = "root" FOR CHANNEL "A123456789A123456789A123456789A123456789A123456789A123456789A123456789";

--error ER_SLAVE_CHANNEL_NAME_INVALID_OR_TOO_LONG
CHANGE MASTER TO MASTER_HOST = "127.0.0.1", MASTER_USER = "root" FOR CHANNEL "         ";

--echo #
--echo #  3.b) Check that maximum channels permitted error is issued.
--echo #
--let @old_debug = @@global.debug
SET GLOBAL DEBUG = "+d, max_replication_channels_exceeded";
--error ER_SLAVE_MAX_CHANNELS_EXCEEDED
CHANGE MASTER TO MASTER_LOG_POS = 4 FOR CHANNEL "257th_channel";

SET GLOBAL DEBUG=@old_debug;

--echo #
--echo #  3.c) Check that restricted channel names cannot be used
--echo #

--error ER_SLAVE_CHANNEL_NAME_INVALID_OR_TOO_LONG
CHANGE MASTER TO MASTER_HOST="localhost", MASTER_PORT=10 FOR CHANNEL "group_replication_applier";
--error ER_SLAVE_CHANNEL_OPERATION_NOT_ALLOWED
CHANGE MASTER TO MASTER_HOST="localhost", MASTER_PORT=10 FOR CHANNEL "group_replication_recovery";

--echo # Assert that channels are not created for failed CHANGE MASTER command.
--echo # and number of channels configured must be 2
--let $assert_text= there shall be only two rows representing 2 channels.
--let $assert_cond= [SELECT COUNT(*) FROM performance_schema.replication_applier_configuration] = 2;
--source include/assert.inc

# End MSR setup.
--let $rpl_skip_sync= 1
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit