| 1 |
# ==== Purpose ==== |
| 2 |
# Verify that a clear and meaningful message is logged on the source when |
| 3 |
# restarting the IO thread. |
| 4 |
# |
| 5 |
# ==== Requirements ==== |
| 6 |
# A clear and meaningful message must be logged in the source log file during |
| 7 |
# the IO thread restart. |
| 8 |
# |
| 9 |
# ==== Implementation ==== |
| 10 |
# 1. Set up initial source-replica configuration |
| 11 |
# 2. Start IO thread on replica which will start a dump thread on source |
| 12 |
# 3. Restart the IO thread (Source should kill existing dump thread before |
| 13 |
# starting a new dump thread) |
| 14 |
# 4. Verify that no message appears stating 'killed the zombie thread' |
| 15 |
# 5. Verify that a message stating 'killed the old dump thread' is present |
| 16 |
# 6. Cleanup |
| 17 |
# |
| 18 |
# ==== References ==== |
| 19 |
# Bug#25330090 SLIGHTLY CONFUSING 'NOTE' REPORTED IN MASTER SERVER'S LOG WHEN |
| 20 |
# SLAVE RECONNECTS |
| 21 |
|
| 22 |
--source include/have_binlog_format_row.inc |
| 23 |
|
| 24 |
--echo # 1. Set up initial source-replica configuration |
| 25 |
--let rpl_skip_start_slave= 1 |
| 26 |
--source include/master-slave.inc |
| 27 |
|
| 28 |
--source include/rpl_connection_slave.inc |
| 29 |
|
| 30 |
--echo # 2. Start IO thread on replica which will start a dump thread on source |
| 31 |
--source include/start_slave_io.inc |
| 32 |
|
| 33 |
--echo # 3. Restart the IO thread (Source should kill existing dump thread |
| 34 |
--echo # before starting a new dump thread) |
| 35 |
--source include/stop_slave_io.inc |
| 36 |
--source include/start_slave_io.inc |
| 37 |
|
| 38 |
--echo # 4. Verify that no message appears stating 'killed the zombie thread' |
| 39 |
--let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.1.err |
| 40 |
--let $assert_count_condition= <=0 |
| 41 |
--let $assert_select= While initializing dump thread for replica with UUID.*, found a zombie dump thread with the same UUID.* |
| 42 |
--let $assert_text= No zombie thread kill message on the source |
| 43 |
--source include/assert_grep.inc |
| 44 |
|
| 45 |
--echo # 5. Verify that a message stating 'killed the old dump thread' is present |
| 46 |
--let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.1.err |
| 47 |
--let $assert_count_condition= >=1 |
| 48 |
--let $assert_select= Upon reconnection with the replica, while initializing the dump thread for.*, an existing dump thread with the same.* was detected.* |
| 49 |
--let $assert_text= Found dump thread kill message on the source |
| 50 |
--source include/assert_grep.inc |
| 51 |
|
| 52 |
--echo # 6. Cleanup |
| 53 |
--source include/rpl_connection_slave.inc |
| 54 |
# We do not care about SQL thread for this test scenario |
| 55 |
--let $rpl_only_running_threads= 1 |
| 56 |
--source include/rpl_end.inc |