| 1 |
# |
| 2 |
# BUG#45214 |
| 3 |
# This test verifies if the slave I/O tread tries to reconnect to |
| 4 |
# master when it tries to get the values of the UNIX_TIMESTAMP, SERVER_ID, |
| 5 |
# COLLATION_SERVER and TIME_ZONE from master under network disconnection. |
| 6 |
# The COLLATION_SERVER and TIME_ZONE are got only on master server version 4. |
| 7 |
# So they can't be verified by test case here. |
| 8 |
# Finish the following tests by calling its common test script: |
| 9 |
# include/rpl_get_master_version_and_clock.test. |
| 10 |
|
| 11 |
source include/not_valgrind.inc; |
| 12 |
source include/have_debug.inc; |
| 13 |
source include/have_debug_sync.inc; |
| 14 |
source include/master-slave.inc; |
| 15 |
|
| 16 |
# |
| 17 |
# The test is not supposed to have any binglog affairs. |
| 18 |
# Hence it's enough it to run only with one binlog format |
| 19 |
# |
| 20 |
source include/have_binlog_format_mixed.inc; |
| 21 |
|
| 22 |
connection slave; |
| 23 |
|
| 24 |
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*"); |
| 25 |
call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to server at 'reading initial communication packet'"); |
| 26 |
call mtr.add_suppression("Fatal error: The slave I/O thread stops because |
| 27 |
master and slave have equal MariaDB server ids; .*"); |
| 28 |
call mtr.add_suppression("Slave I/O thread .* register on master"); |
| 29 |
|
| 30 |
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection |
| 31 |
SET @saved_dbug = @@GLOBAL.debug_dbug; |
| 32 |
|
| 33 |
# set up two parameters to pass into include/rpl_get_master_version_and_clock |
| 34 |
let $dbug_sync_point= 'debug_lock.before_get_UNIX_TIMESTAMP'; |
| 35 |
let $debug_sync_action= 'now SIGNAL signal.get_unix_timestamp'; |
| 36 |
source include/rpl_get_master_version_and_clock.test; |
| 37 |
|
| 38 |
#Test case 2: Try to get the value of the SERVER_ID from master under network disconnection |
| 39 |
connection slave; |
| 40 |
|
| 41 |
let $dbug_sync_point= 'debug_lock.before_get_SERVER_ID'; |
| 42 |
let $debug_sync_action= 'now SIGNAL signal.get_server_id'; |
| 43 |
source include/rpl_get_master_version_and_clock.test; |
| 44 |
|
| 45 |
|
| 46 |
# cleanup |
| 47 |
SET @@GLOBAL.debug_dbug = @saved_dbug; |
| 48 |
# is not really necessary but avoids mtr post-run env check warnings |
| 49 |
SET DEBUG_SYNC= 'RESET'; |
| 50 |
|
| 51 |
# End of tests |
| 52 |
--source include/rpl_end.inc |