| 1 |
############################################################################## |
| 2 |
# BUG#19507923: CANNOT DO POSITIONS SYNC WHEN AUTO_POSITION IS ON |
| 3 |
# |
| 4 |
# Purpose of the test: |
| 5 |
# |
| 6 |
# 1. Start replication with gtid-mode= on and master_auto_position= 1. |
| 7 |
# 2. Execute DML and DDL on master and sync slave with master. |
| 8 |
# 3. Re-start master with gtid-mode= on and master_auto_position= 1. |
| 9 |
# 4. At slave, select source_pos_wait() with |
| 10 |
# pos= end log position of previous gtid log event in the latest |
| 11 |
# binary log at master. |
| 12 |
# 5. Verify that the slave does not hang on sync with the master. |
| 13 |
# |
| 14 |
|
| 15 |
--source include/have_binlog_format_statement.inc |
| 16 |
|
| 17 |
--echo # |
| 18 |
--echo # Step 1: setup replication |
| 19 |
--echo # |
| 20 |
--let $rpl_skip_start_slave= 1 |
| 21 |
--source include/master-slave.inc |
| 22 |
|
| 23 |
# Bug#23297190 :RPL_GTID_SERVER_SIGHUP AND RPL_SOURCE_POS_WAIT_AFTER_STARTUP FAILS |
| 24 |
# IN VALGRIND : Increased the time interval between the connection retries. |
| 25 |
--let $rpl_connection_name= slave |
| 26 |
--source include/rpl_connection.inc |
| 27 |
CHANGE REPLICATION SOURCE TO SOURCE_CONNECT_RETRY=30, SOURCE_RETRY_COUNT=30; |
| 28 |
--source include/start_slave.inc |
| 29 |
|
| 30 |
# Ensuring that prev_gtids_event will have some gtid after binlog rotation |
| 31 |
--let $rpl_connection_name= master |
| 32 |
--source include/rpl_connection.inc |
| 33 |
create table t1 (a int); |
| 34 |
Insert into t1 values(1); |
| 35 |
drop table t1; |
| 36 |
--source include/sync_slave_sql_with_master.inc |
| 37 |
|
| 38 |
--echo # |
| 39 |
--echo # Step 2: restart Master |
| 40 |
--echo # |
| 41 |
|
| 42 |
--let $rpl_connection_name= master |
| 43 |
--source include/rpl_connection.inc |
| 44 |
--let $rpl_server_number= 1 |
| 45 |
--let $rpl_start_with_gtids= 1 |
| 46 |
--source include/rpl_restart_server.inc |
| 47 |
--source include/wait_until_connected_again.inc |
| 48 |
|
| 49 |
--echo # |
| 50 |
--echo # Step 3: Wait on positions by setting ignore_gtids_on_sync= 1. |
| 51 |
--echo # The sync_slave_sql_with_master.inc will call SOURCE_POS_WAIT() |
| 52 |
--echo # internally verifying the fix. |
| 53 |
--echo # |
| 54 |
|
| 55 |
--let $rpl_connection_name= master |
| 56 |
--source include/rpl_connection.inc |
| 57 |
--let $ignore_gtids_on_sync= 1 |
| 58 |
--source include/sync_slave_sql_with_master.inc |
| 59 |
--let $ignore_gtids_on_sync= 0 |
| 60 |
|
| 61 |
--source include/rpl_end.inc |