|
| 1 | +connect active_master, 127.0.0.1, root, , , $SERVER_MYPORT_2; |
| 2 | +connect inactive_master, 127.0.0.1, root, , , $SERVER_MYPORT_3; |
| 3 | +connect slave, 127.0.0.1, root, , , $SERVER_MYPORT_1; |
| 4 | +CHANGE MASTER TO |
| 5 | +master_host='127.0.0.1', master_port=MYPORT_2, master_user='root'; |
| 6 | +START SLAVE SQL_THREAD; |
| 7 | +CHANGE MASTER 'inactive' TO |
| 8 | +master_host='127.0.0.1', master_port=MYPORT_3; |
| 9 | +include/wait_for_slave_sql_to_start.inc |
| 10 | +# Control State |
| 11 | +Connection_name = '' |
| 12 | +Connection_name = 'inactive' |
| 13 | +Slave_IO_Running = 'No' |
| 14 | +Slave_IO_Running = 'No' |
| 15 | +Slave_SQL_Running = 'Yes' |
| 16 | +Slave_SQL_Running = 'No' |
| 17 | +# Basic |
| 18 | +$MYSQL_DUMP --compact --dump-slave --include-master-host-port test |
| 19 | +/*M!999999\- enable the sandbox mode */ |
| 20 | +CHANGE MASTER '' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MYPORT_2, MASTER_LOG_FILE='', MASTER_LOG_POS=4; |
| 21 | +CHANGE MASTER 'inactive' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MYPORT_3, MASTER_LOG_FILE='', MASTER_LOG_POS=0; |
| 22 | + |
| 23 | +-- SET GLOBAL gtid_slave_pos=''; |
| 24 | +# MDEV-7611 mysqldump --dump-slave always starts stopped slave |
| 25 | +$MYSQL_DUMP --compact --dump-slave test |
| 26 | +/*M!999999\- enable the sandbox mode */ |
| 27 | +CHANGE MASTER '' TO MASTER_LOG_FILE='', MASTER_LOG_POS=4; |
| 28 | +CHANGE MASTER 'inactive' TO MASTER_LOG_FILE='', MASTER_LOG_POS=0; |
| 29 | + |
| 30 | +-- SET GLOBAL gtid_slave_pos=''; |
| 31 | +include/wait_for_slave_sql_to_start.inc |
| 32 | +Connection_name = '' |
| 33 | +Connection_name = 'inactive' |
| 34 | +Slave_IO_Running = 'No' |
| 35 | +Slave_IO_Running = 'No' |
| 36 | +Slave_SQL_Running = 'Yes' |
| 37 | +Slave_SQL_Running = 'No' |
| 38 | +# MDEV-5624 mysqldump --dump-slave option does not restart the replication if the dump has failed |
| 39 | +$MYSQL_DUMP --compact --dump-slave no_such_db |
| 40 | +/*M!999999\- enable the sandbox mode */ |
| 41 | +CHANGE MASTER '' TO MASTER_LOG_FILE='', MASTER_LOG_POS=4; |
| 42 | +CHANGE MASTER 'inactive' TO MASTER_LOG_FILE='', MASTER_LOG_POS=0; |
| 43 | + |
| 44 | +include/wait_for_slave_sql_to_start.inc |
| 45 | +Connection_name = '' |
| 46 | +Connection_name = 'inactive' |
| 47 | +Slave_IO_Running = 'No' |
| 48 | +Slave_IO_Running = 'No' |
| 49 | +Slave_SQL_Running = 'Yes' |
| 50 | +Slave_SQL_Running = 'No' |
| 51 | +# Cleanup |
| 52 | +STOP SLAVE SQL_THREAD; |
| 53 | +disconnect active_master; |
| 54 | +disconnect inactive_master; |
| 55 | +include/wait_for_slave_sql_to_stop.inc |
| 56 | +disconnect slave; |
0 commit comments