| 1 |
############################################################################### |
| 2 |
# Bug#21179199 ZOMBIE DUMP THREADS ARE NOT DISCONNECTED, |
| 3 |
# CAN ALSO LEAD TO A CRASH |
| 4 |
# |
| 5 |
# Problem: Zombie dump threads on Master (>= MySQL-5.6 version) |
| 6 |
# that are created to server slaves which are on lower |
| 7 |
# versions than MySQL-5.6 version are not getting killed. |
| 8 |
# Steps to reproduce: |
| 9 |
# |
| 10 |
# 1) A simulation point on slave to fake that server MySQL version is lower |
| 11 |
# than MySQL-5.6 (i.e., no replica_uuid set in initial replication protocol) |
| 12 |
# |
| 13 |
# 2) Start IO thread on Slave which will start a dump thread on Master. |
| 14 |
# |
| 15 |
# 3) Restart the IO thread (Master should kill existing dump thread before |
| 16 |
# starting a new dump thread) |
| 17 |
# |
| 18 |
# 4) Now count the number of dump threads on Master, it should be only '1'. |
| 19 |
# |
| 20 |
############################################################################### |
| 21 |
--source include/have_debug.inc |
| 22 |
--source include/have_binlog_format_statement.inc |
| 23 |
--let rpl_skip_start_slave= 1 |
| 24 |
--source include/master-slave.inc |
| 25 |
|
| 26 |
# When this test script is running in combination with other tests, |
| 27 |
# it is possible that dump threads from those tests are not killed. |
| 28 |
# (rpl_end.inc does not kill dump threads). |
| 29 |
# Hence doing the cleanup here as this test depends on counting the |
| 30 |
# active dump threads. |
| 31 |
--source include/stop_dump_threads.inc |
| 32 |
|
| 33 |
# Step-1) A simulation point on slave to fake that server MySQL version |
| 34 |
# is lower than MySQL-5.6 (i.e., no replica_uuid set in initial replication |
| 35 |
# protocol). |
| 36 |
--source include/rpl_connection_slave.inc |
| 37 |
SET @save_debug = @@GLOBAL.debug; |
| 38 |
SET GLOBAL debug="+d,fake_5_5_version_replica"; |
| 39 |
|
| 40 |
# Step-2) Start IO thread on Slave which will start a dump thread on Master. |
| 41 |
--source include/start_slave_io.inc |
| 42 |
|
| 43 |
# Step-3) Restart the IO thread (Master should kill existing dump thread before |
| 44 |
# starting a new dump thread) |
| 45 |
--source include/stop_slave_io.inc |
| 46 |
--source include/start_slave_io.inc |
| 47 |
|
| 48 |
# Step-4) Count the number of dump threads on Master, it should be eventually |
| 49 |
# become '1'. |
| 50 |
--source include/rpl_connection_master.inc |
| 51 |
--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE COMMAND LIKE 'Binlog Dump%' |
| 52 |
--source include/wait_condition.inc |
| 53 |
|
| 54 |
# Cleanup |
| 55 |
--source include/rpl_connection_slave.inc |
| 56 |
SET GLOBAL debug=@save_debug; |
| 57 |
# We do not care about SQL thread for this test scenario |
| 58 |
--let $rpl_only_running_threads= 1 |
| 59 |
--source include/rpl_end.inc |