| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
connection slave; |
| 4 |
include/stop_slave.inc |
| 5 |
CHANGE MASTER TO MASTER_USE_GTID=slave_pos; |
| 6 |
# |
| 7 |
# Initialize test data |
| 8 |
connection master; |
| 9 |
create table t1 (a int); |
| 10 |
SET @@session.server_id= 3; |
| 11 |
create table t2 (a int); |
| 12 |
include/save_master_gtid.inc |
| 13 |
# |
| 14 |
# Have the replica "reconnect" and the primary will send Gtid, Glle, DDL |
| 15 |
connection slave; |
| 16 |
set global gtid_slave_pos="0-3-1"; |
| 17 |
include/start_slave.inc |
| 18 |
include/sync_with_master_gtid.inc |
| 19 |
# |
| 20 |
# Ensure that the replica did not error |
| 21 |
connection slave; |
| 22 |
include/sync_with_master_gtid.inc |
| 23 |
Last_SQL_Error = |
| 24 |
Last_SQL_Errno = 0 |
| 25 |
# |
| 26 |
# Ensure that the primary sent a Glle after a Gtid event |
| 27 |
include/show_events.inc |
| 28 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 29 |
slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=POS |
| 30 |
slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION |
| 31 |
slave-relay-bin.000002 # Binlog_checkpoint # # master-bin.000001 |
| 32 |
slave-relay-bin.000002 # Gtid # # GTID #-#-# |
| 33 |
slave-relay-bin.000002 # Gtid_list # # [#-#-#] |
| 34 |
slave-relay-bin.000002 # Query # # use `test`; create table t2 (a int) |
| 35 |
# |
| 36 |
# Ensure the DDL was executed on the replica |
| 37 |
# |
| 38 |
# Cleanup |
| 39 |
# t1 does not make it to the replica |
| 40 |
connection master; |
| 41 |
set sql_log_bin=0; |
| 42 |
DROP TABLE t1; |
| 43 |
set sql_log_bin=1; |
| 44 |
DROP TABLE t2; |
| 45 |
include/rpl_end.inc |