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_relay_log.test

--echo #########################################################################
--echo # Verify RESET SLAVE and RESET SLAVE FOR CHANNEL
--echo # - deletes all relay log files of named channels and reintializes
--echo # them.
--echo # - For default channel, it restart the relay log from .000001
--echo # - For named channel, it restart the relay log from ch.000001
--echo #########################################################################
# The test doesn't relate to binlog format, so it is just tested on mixed mode.
#Skip on group replication runs
--source include/not_group_replication_plugin.inc
--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc

--source include/rpl_connection_slave.inc
--let $datadir= `SELECT @@GLOBAL.datadir`

# add a new channel
CHANGE MASTER TO MASTER_HOST="localhost", MASTER_PORT=10 FOR CHANNEL "ch1";
CHANGE MASTER TO MASTER_HOST="localhost", MASTER_PORT=11 FOR CHANNEL "ch2";

FLUSH RELAY LOGS;
FLUSH RELAY LOGS FOR CHANNEL "ch1";
FLUSH RELAY LOGS FOR CHANNEL "ch2";

--echo #
--echo # RESET SLAVE FOR CHANNEL "ch1" deletes all relay log files of ch1.
--echo #
eval RESET SLAVE FOR CHANNEL "ch1";

# all files of "ch1" are deleted and recreated.
--list_files $datadir *ch1*

--echo #
--echo # RESET SLAVE deletes all relay log files of ch2
--echo #
--disable_warnings
--source include/stop_slave.inc
--enable_warnings
RESET SLAVE;

# all files of "ch2" are deleted and recreated.
--list_files $datadir *ch2*

--echo #
--echo # RESET SLAVE resets relay log of default channel from .000001
--echo #
# relay log files of default channel is still there
--let $relay_log_index= `SELECT @@GLOBAL.relay_log_index`
--file_exists $relay_log_index

--let $relay_log_basename= `SELECT @@GLOBAL.relay_log_basename`
--file_exists $relay_log_basename.000001

--echo #
--echo # Relay log files for all channels are recreated automatically.
--echo #

# Check that files exist.
--let $relay_log_base_name= `SELECT @@GLOBAL.relay_log_basename`
--file_exists $relay_log_base_name-ch1.000001
--file_exists $relay_log_base_name-ch2.000001

--echo #
--echo # RESET SLAVE ALL deletes all channels info and files.
--echo #
RESET SLAVE ALL;

# all files of "ch1" and "ch2" are removed
--list_files $datadir *ch1*
--list_files $datadir *ch2*

# relay log files of default channel is still there
--let $relay_log_index= `SELECT @@GLOBAL.relay_log_index`
--file_exists $relay_log_index

--let $relay_log_basename= `SELECT @@GLOBAL.relay_log_basename`
--file_exists $relay_log_basename.000001

--disable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO MASTER_HOST="127.0.0.1", MASTER_PORT=$MASTER_MYPORT,
     MASTER_USER="root";
--enable_warnings

--source include/start_slave.inc
--source include/rpl_end.inc


Man Man