| 1 |
# The test is currently experimental and crashes a lot, don't run it in Valgrind: |
| 2 |
source include/not_valgrind.inc; |
| 3 |
|
| 4 |
# |
| 5 |
# BUG#45214 |
| 6 |
# This test verifies if the slave I/O tread tries to reconnect to |
| 7 |
# master when it tries to get the values of the UNIX_TIMESTAMP, SERVER_ID, |
| 8 |
# COLLATION_SERVER and TIME_ZONE from master under network disconnection. |
| 9 |
# The COLLATION_SERVER and TIME_ZONE are got only on master server version 4. |
| 10 |
# So they can't be verified by test case here. |
| 11 |
# Finish the following tests by calling its common test script: |
| 12 |
# extra/rpl_tests/rpl_get_master_version_and_clock.test. |
| 13 |
|
| 14 |
source include/master-slave.inc; |
| 15 |
source include/have_debug.inc; |
| 16 |
source include/have_debug_sync.inc; |
| 17 |
|
| 18 |
# |
| 19 |
# The test is not supposed to have any binglog affairs. |
| 20 |
# Hence it's enough it to run only with one binlog format |
| 21 |
# |
| 22 |
source include/have_binlog_format_mixed.inc; |
| 23 |
|
| 24 |
connection slave; |
| 25 |
|
| 26 |
call mtr.add_suppression("Replica I/O: Source command COM_REGISTER_REPLICA failed: .*"); |
| 27 |
call mtr.add_suppression("Replica I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'"); |
| 28 |
call mtr.add_suppression("Fatal error: The replica I/O thread stops because source and replica have equal MySQL server ids; .*"); |
| 29 |
call mtr.add_suppression("Replica I/O thread .* register on source"); |
| 30 |
call mtr.add_suppression("Unknown system variable 'SERVER_UUID' on source"); |
| 31 |
|
| 32 |
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection |
| 33 |
|
| 34 |
# set up two parameters to pass into extra/rpl_tests/rpl_get_master_version_and_clock |
| 35 |
let $dbug_sync_point= 'debug_lock.before_get_UNIX_TIMESTAMP'; |
| 36 |
let $debug_sync_action= 'now SIGNAL signal.get_unix_timestamp'; |
| 37 |
source extra/rpl_tests/rpl_get_master_version_and_clock.test; |
| 38 |
|
| 39 |
#Test case 2: Try to get the value of the SERVER_ID from master under network disconnection |
| 40 |
connection slave; |
| 41 |
|
| 42 |
let $dbug_sync_point= 'debug_lock.before_get_SERVER_ID'; |
| 43 |
let $debug_sync_action= 'now SIGNAL signal.get_server_id'; |
| 44 |
source extra/rpl_tests/rpl_get_master_version_and_clock.test; |
| 45 |
|
| 46 |
#Test case 3: Try to get the value of the MASTER_UUID from master under network disconnection |
| 47 |
connection slave; |
| 48 |
|
| 49 |
let $dbug_sync_point= 'dbug.before_get_SOURCE_UUID'; |
| 50 |
let $debug_sync_action= 'now SIGNAL signal.get_source_uuid'; |
| 51 |
source extra/rpl_tests/rpl_get_master_version_and_clock.test; |
| 52 |
|
| 53 |
#Test case 4: This test checks that the slave I/O thread refuses to start |
| 54 |
#if slave and master have the same server id. |
| 55 |
connection slave; |
| 56 |
reset master; |
| 57 |
# replicate ourselves |
| 58 |
source include/stop_slave.inc; |
| 59 |
--replace_result $SLAVE_MYPORT SLAVE_PORT |
| 60 |
eval CHANGE REPLICATION SOURCE to SOURCE_PORT=$SLAVE_MYPORT; |
| 61 |
start slave; |
| 62 |
|
| 63 |
--echo *** must be having the replicate-same-server-id IO thread error *** |
| 64 |
let $slave_io_errno= 13117; |
| 65 |
let $show_slave_io_error= 1; |
| 66 |
source include/wait_for_slave_io_error.inc; |
| 67 |
|
| 68 |
# Bug#45214 cleanup |
| 69 |
|
| 70 |
# is not really necessary but avoids mtr post-run env check warnings |
| 71 |
SET DEBUG_SYNC= 'RESET'; |
| 72 |
|
| 73 |
# clear slave_io_error |
| 74 |
--source include/stop_slave_sql.inc |
| 75 |
RESET SLAVE; |
| 76 |
--replace_result $MASTER_MYPORT MASTER_PORT |
| 77 |
--eval CHANGE REPLICATION SOURCE TO SOURCE_PORT=$MASTER_MYPORT; |
| 78 |
|
| 79 |
# |
| 80 |
# Bug #22748612 MYSQL-57 AND MYSQL-TRUNK(SLAVE) FAILS TO CONNECT TO MYSQL-55(MASTER) |
| 81 |
# |
| 82 |
--connection slave |
| 83 |
--let $debug_point=dbug.simulate_no_such_var_server_uuid |
| 84 |
--source include/add_debug_point.inc |
| 85 |
--source include/start_slave_io.inc |
| 86 |
--let $assert_text= Master_uuid must be empty string |
| 87 |
--let $assert_cond= "[SHOW SLAVE STATUS, Master_UUID, 1]" = "" |
| 88 |
--source include/assert.inc |
| 89 |
|
| 90 |
--source include/stop_slave_io.inc |
| 91 |
--source include/remove_debug_point.inc |
| 92 |
|
| 93 |
# End of tests |
| 94 |
--let $rpl_only_running_threads= 1 |
| 95 |
--source include/rpl_end.inc |