| 1 |
# |
| 2 |
# WL#1697: Multisource replication |
| 3 |
# |
| 4 |
# The aim of this test : |
| 5 |
# 1. To check if io threads and sql threads of all channels |
| 6 |
# are started with START SLAVE IO_THREAD and START SLAVE SQL_THREAD |
| 7 |
# respecively. |
| 8 |
# 2. To check that individually the start of io_thread and sql_thread |
| 9 |
# are independent i.e if sql_threads of all channels are running |
| 10 |
# and if a START SLAVE IO_THREAD is issued, io_threads of all |
| 11 |
# channels must be running. |
| 12 |
# 3. Test that per channel start and stop slave commands work |
| 13 |
# -a) START SLAVE IO_THREAD FOR CHANNEL |
| 14 |
# -b) START SLAVE SQL_THREAD FOR CHANNEL |
| 15 |
# -c) STOP SLAVE IO_THREAD FOR CHANNEL |
| 16 |
# -d) STOP SLAVE SQL_THREAD FOR CHANNEL |
| 17 |
|
| 18 |
#Skip on group replication runs |
| 19 |
--source include/not_group_replication_plugin.inc |
| 20 |
--source include/have_binlog_format_mixed.inc |
| 21 |
# Test requires master-info-repository=TABLE, relay-log-info-repository=TABLE |
| 22 |
--source include/have_slave_repository_type_table.inc |
| 23 |
|
| 24 |
--echo # |
| 25 |
--echo # Set up masters server_1 and server_3 with server_2 being a slave. |
| 26 |
--echo #. |
| 27 |
--let $rpl_topology= 1->2,3->2 |
| 28 |
--let $rpl_multi_source= 1 |
| 29 |
--let $rpl_skip_start_slave= 1 |
| 30 |
--source include/rpl_init.inc |
| 31 |
|
| 32 |
# |
| 33 |
# On slave |
| 34 |
# |
| 35 |
--let $rpl_connection_name= server_2 |
| 36 |
--source include/rpl_connection.inc |
| 37 |
|
| 38 |
--echo # |
| 39 |
--echo # 1) Execute START SLAVE IO_THREAD; io_threads of all channels shall start |
| 40 |
--echo # |
| 41 |
START SLAVE IO_THREAD; |
| 42 |
|
| 43 |
# check till IO_thread returned Yes |
| 44 |
--let $rpl_source_file= include/wait_for_slave_io_to_start.inc |
| 45 |
--source include/rpl_for_each_connection.inc |
| 46 |
|
| 47 |
--echo # |
| 48 |
--echo # 2) Execute START SLAVE SQL_THREAD; sql_threads of all channels shall start |
| 49 |
--echo # |
| 50 |
START SLAVE SQL_THREAD; |
| 51 |
|
| 52 |
# check till SQL_thread returned Yes |
| 53 |
--let $rpl_source_file= include/wait_for_slave_sql_to_start.inc |
| 54 |
--source include/rpl_for_each_connection.inc |
| 55 |
|
| 56 |
--echo # |
| 57 |
--echo # Do stop slave IO_thread. SQL threads must still be running |
| 58 |
--echo # |
| 59 |
STOP SLAVE IO_THREAD; |
| 60 |
|
| 61 |
--let $rpl_source_file= include/wait_for_slave_io_to_stop.inc |
| 62 |
--source include/rpl_for_each_connection.inc |
| 63 |
|
| 64 |
--echo # |
| 65 |
--echo # Do start slave. IO threads should be up independently. |
| 66 |
--echo # |
| 67 |
START SLAVE; |
| 68 |
|
| 69 |
--let $rpl_source_file= include/wait_for_slave_io_to_start.inc |
| 70 |
--source include/rpl_for_each_connection.inc |
| 71 |
|
| 72 |
--echo # |
| 73 |
--echo # Do STOP SLAVE. All slave threads for all channnels must be down. |
| 74 |
--echo # |
| 75 |
STOP SLAVE; |
| 76 |
|
| 77 |
--let $rpl_source_file= include/wait_for_slave_to_stop.inc |
| 78 |
--source include/rpl_for_each_connection.inc |
| 79 |
|
| 80 |
--echo # |
| 81 |
--echo # 3) Check start and stop FOR CHANNEL, the inc files wait till |
| 82 |
--echo # the threads are run. No Notes shall be emitted also. |
| 83 |
--echo # |
| 84 |
|
| 85 |
--echo # 3.a) Test START SLAVE IO_THREAD FOR CHANNEL |
| 86 |
--let $rpl_channel_name= 'channel_1' |
| 87 |
--source include/start_slave_io.inc |
| 88 |
|
| 89 |
--echo # 3.b) Test START SLAVE SQL_THREAD FOR CHANNEL |
| 90 |
--let $rpl_channel_name= 'channel_1' |
| 91 |
--source include/start_slave_sql.inc |
| 92 |
|
| 93 |
--echo # 3.c) Test STOP SLAVE IO_THREAD FOR CHANNEL |
| 94 |
--let $rpl_channel_name= 'channel_1' |
| 95 |
--source include/stop_slave_io.inc |
| 96 |
|
| 97 |
--echo # 3.d) Test STOP SLAVE SQL_THREAD FOR CHANNEL |
| 98 |
--let $rpl_channel_name= 'channel_1' |
| 99 |
--source include/stop_slave_sql.inc |
| 100 |
|
| 101 |
|
| 102 |
--let $rpl_skip_sync= 1 |
| 103 |
--let $rpl_only_running_threads= 1 |
| 104 |
--source include/rpl_end.inc |