| 1 |
############################################################################### |
| 2 |
# Bug#17453826:ASSERSION ERROR WHEN SETTING FUTURE BINLOG FILE/POS WITH |
| 3 |
# SEMISYNC |
| 4 |
# |
| 5 |
# Problem: |
| 6 |
# ======== |
| 7 |
# When DMLs are in progress on the master, stopping a slave and setting ahead |
| 8 |
# binlog name/pos will cause an asssert on the master. |
| 9 |
# |
| 10 |
# Test: |
| 11 |
# ===== |
| 12 |
# Do DMLs on the master and on the slave do a stop slave. Execute change master |
| 13 |
# to a future binlog file name and position which doesn't exist. Master should |
| 14 |
# not assert. |
| 15 |
############################################################################### |
| 16 |
--source include/have_semisync_plugin.inc |
| 17 |
--source include/master-slave.inc |
| 18 |
--source include/install_semisync.inc |
| 19 |
|
| 20 |
call mtr.add_suppression("Timeout waiting for reply of binlog*"); |
| 21 |
call mtr.add_suppression("Read semi-sync reply network error"); |
| 22 |
call mtr.add_suppression("Semi-sync source failed on net_flush.. before waiting for replica reply"); |
| 23 |
CALL mtr.add_suppression("Could not find first log file name in binary log"); |
| 24 |
|
| 25 |
--source include/rpl_connection_master.inc |
| 26 |
CREATE TABLE t1 (a INT); |
| 27 |
--let $binlog_pos= query_get_value("SHOW MASTER STATUS", Position, 1) |
| 28 |
--let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1) |
| 29 |
--source include/sync_slave_sql_with_master.inc |
| 30 |
--source include/stop_slave.inc |
| 31 |
|
| 32 |
--source include/rpl_connection_master.inc |
| 33 |
--send INSERT INTO t1 VALUES(0) |
| 34 |
|
| 35 |
--source include/rpl_connection_master1.inc |
| 36 |
--let $status_var= rpl_semi_sync_source_wait_sessions |
| 37 |
--let $status_var_value= 1 |
| 38 |
--source include/wait_for_status_var.inc |
| 39 |
|
| 40 |
--source include/rpl_connection_slave.inc |
| 41 |
CHANGE REPLICATION SOURCE TO SOURCE_LOG_FILE='master-bin.000002', SOURCE_LOG_POS=4, SOURCE_AUTO_POSITION=0; |
| 42 |
START SLAVE; |
| 43 |
--let $slave_io_errno=13114 |
| 44 |
--source include/wait_for_slave_io_error.inc |
| 45 |
|
| 46 |
--source include/rpl_connection_master.inc |
| 47 |
--reap |
| 48 |
INSERT INTO t1 VALUES (20); |
| 49 |
|
| 50 |
# Since dump thread has exited and no slaves are connected, master_clients |
| 51 |
# must be zero. |
| 52 |
--source include/rpl_connection_master.inc |
| 53 |
--let $master_clients=[show status like "Rpl_semi_sync_source_clients", Value, 1] |
| 54 |
--let assert_cond= $master_clients = 0 |
| 55 |
--let assert_text= semi sync master clients should be 0. |
| 56 |
--source include/assert.inc |
| 57 |
|
| 58 |
--source include/rpl_connection_slave.inc |
| 59 |
--source include/stop_slave.inc |
| 60 |
--replace_regex /SOURCE_LOG_FILE=[^,]+/SOURCE_LOG_FILE=FILE/ /SOURCE_LOG_POS=[0-9]+/ SOURCE_LOG_POS= POS/ |
| 61 |
eval CHANGE REPLICATION SOURCE TO SOURCE_LOG_FILE='$master_binlog', SOURCE_LOG_POS=$binlog_pos, SOURCE_AUTO_POSITION=0; |
| 62 |
--source include/start_slave.inc |
| 63 |
|
| 64 |
--source include/rpl_connection_master.inc |
| 65 |
DROP TABLE t1; |
| 66 |
--source include/sync_slave_sql_with_master.inc |
| 67 |
--source include/uninstall_semisync.inc |
| 68 |
--source include/rpl_end.inc |