config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/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

Man Man