config root man

Current Path : /home/usr.opt/mysql57/mysql-test/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/t/rpl_multi_source_mysqldump_slave.test

# ==== Purpose ====
#
# This test will call mysqldump client program to dump the slave channels
# configuration, showing that it is able to dump the configuration for
# other channels than the default one, regardless of having a default
# channel configured.
#
# Then, the test will apply the generated dump to ensure that it is
# syntactically correct.
#
# ==== Related Bugs and Worklogs ====
#
# BUG#21855705 MYSQLDUMP --DUMP-SLAVE DOES NOT WORK WITH MULTI-SOURCE
#

--source include/not_embedded.inc
call mtr.add_suppression("Invalid .* username when attempting to connect to the master server");

# Multi source replication needs those repositories on TABLE
--let $save_mi_repo_type=`SELECT @@GLOBAL.master_info_repository`
SET GLOBAL master_info_repository='TABLE';
--let $save_rli_repo_type=`SELECT @@GLOBAL.relay_log_info_repository`
SET GLOBAL relay_log_info_repository='TABLE';

--echo #
--echo # 1. Without having a default channel configured
--echo #

--echo # Create two additional replication channels
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_LOG_FILE='master-bin-ch1.000001', MASTER_LOG_POS=4 FOR CHANNEL 'ch1';
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_LOG_FILE='master-bin-ch2.000001', MASTER_LOG_POS=4 FOR CHANNEL 'ch2';

--echo # Execute mysqldump with --dump-slave
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave --set-gtid-purged=OFF test > $MYSQL_TMP_DIR/chm_1_dump.sql
--cat_file $MYSQL_TMP_DIR/chm_1_dump.sql
--echo # Execute mysql using the dump as input
--exec $MYSQL --force < $MYSQL_TMP_DIR/chm_1_dump.sql
--remove_file $MYSQL_TMP_DIR/chm_1_dump.sql
--let $slave_io_errno= convert_error(ER_SLAVE_FATAL_ERROR)
--source include/stop_slave.inc

--echo #
--echo # 2. With a default channel configured
--echo #

--echo # Setup the default replication channel
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_LOG_FILE="master-bin-default.000001", MASTER_LOG_POS=4 FOR CHANNEL '';

--echo # Execute mysqldump with --dump-slave
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave --set-gtid-purged=OFF test > $MYSQL_TMP_DIR/chm_2_dump.sql
--cat_file $MYSQL_TMP_DIR/chm_2_dump.sql
--echo # Execute mysql using the dump as input
--exec $MYSQL --force < $MYSQL_TMP_DIR/chm_2_dump.sql
--remove_file $MYSQL_TMP_DIR/chm_2_dump.sql
--source include/stop_slave.inc

# Clean up
RESET SLAVE ALL;
--replace_result $save_mi_repo_type SAVE_MI_REPO_TYPE
--eval SET @@global.master_info_repository='$save_mi_repo_type'
--replace_result $save_rli_repo_type SAVE_RLI_REPO_TYPE
--eval SET @@global.relay_log_info_repository='$save_rli_repo_type'

Man Man