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
|
##############################################################################
# BUG#19507923: CANNOT DO POSITIONS SYNC WHEN AUTO_POSITION IS ON
#
# Purpose of the test:
#
# 1. Start replication with gtid-mode= on and master_auto_position= 1.
# 2. Execute DML and DDL on master and sync slave with master.
# 3. Re-start master with gtid-mode= on and master_auto_position= 1.
# 4. At slave, select source_pos_wait() with
# pos= end log position of previous gtid log event in the latest
# binary log at master.
# 5. Verify that the slave does not hang on sync with the master.
#
--source include/have_binlog_format_statement.inc
--echo #
--echo # Step 1: setup replication
--echo #
--let $rpl_skip_start_slave= 1
--source include/master-slave.inc
# Bug#23297190 :RPL_GTID_SERVER_SIGHUP AND RPL_SOURCE_POS_WAIT_AFTER_STARTUP FAILS
# IN VALGRIND : Increased the time interval between the connection retries.
--let $rpl_connection_name= slave
--source include/rpl_connection.inc
CHANGE REPLICATION SOURCE TO SOURCE_CONNECT_RETRY=30, SOURCE_RETRY_COUNT=30;
--source include/start_slave.inc
# Ensuring that prev_gtids_event will have some gtid after binlog rotation
--let $rpl_connection_name= master
--source include/rpl_connection.inc
create table t1 (a int);
Insert into t1 values(1);
drop table t1;
--source include/sync_slave_sql_with_master.inc
--echo #
--echo # Step 2: restart Master
--echo #
--let $rpl_connection_name= master
--source include/rpl_connection.inc
--let $rpl_server_number= 1
--let $rpl_start_with_gtids= 1
--source include/rpl_restart_server.inc
--source include/wait_until_connected_again.inc
--echo #
--echo # Step 3: Wait on positions by setting ignore_gtids_on_sync= 1.
--echo # The sync_slave_sql_with_master.inc will call SOURCE_POS_WAIT()
--echo # internally verifying the fix.
--echo #
--let $rpl_connection_name= master
--source include/rpl_connection.inc
--let $ignore_gtids_on_sync= 1
--source include/sync_slave_sql_with_master.inc
--let $ignore_gtids_on_sync= 0
--source include/rpl_end.inc
|