mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
39 lines
1.3 KiB
Text
39 lines
1.3 KiB
Text
--source include/master-slave.inc
|
|
|
|
--echo #
|
|
--echo # New --dump-slave, --apply-slave-statements functionality
|
|
--echo #
|
|
|
|
# There is a gap between when START SLAVE returns and when MASTER_LOG_FILE and
|
|
# MASTER_LOG_POS are set. Ensure that we don't call SHOW SLAVE STATUS during
|
|
# that gap.
|
|
--sync_slave_with_master
|
|
|
|
connection master;
|
|
use test;
|
|
|
|
connection slave;
|
|
|
|
# Execute mysqldump with --dump-slave
|
|
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
|
|
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave test
|
|
|
|
# Execute mysqldump with --dump-slave and --apply-slave-statements
|
|
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
|
|
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave --apply-slave-statements test
|
|
|
|
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
|
|
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
|
# Execute mysqldump with --dump-slave ,--apply-slave-statements and --include-master-host-port
|
|
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave --apply-slave-statements --include-master-host-port test
|
|
|
|
#
|
|
# MDEV-5624 mysqldump --dump-slave option does not restart the replication if the dump has failed
|
|
#
|
|
slave start;
|
|
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
|
|
--error 2
|
|
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave no_such_db
|
|
slave start;
|
|
|
|
--source include/rpl_end.inc
|