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