| 1 |
################################################################################ |
| 2 |
# Bug#20464737 SEMI_SYNC: SLAVE IO FAILS WITH ER1236 'SLAVE HAS MORE GTIDS THAN |
| 3 |
# THE MASTER HAS' |
| 4 |
# |
| 5 |
# Slaves, especially semisync slaves, encountered ER1236 when connecting to |
| 6 |
# their masters. When connecting to the master with COM_GTID_DUMP request, |
| 7 |
# the slave sends all replicated gtids to master and master checks if all the |
| 8 |
# slave gtids(only the gtids have master's uuid) are included in master's |
| 9 |
# gtid_executed. However, there is a chance that a gtid is already in slave's |
| 10 |
# gtid_executed, but not in master's gtid_executed. Gtid is added into |
| 11 |
# gtid_executed after it is binlogged, so it is possible that a transaction is |
| 12 |
# replicated and applied on slave, but not committed on master yet. |
| 13 |
# |
| 14 |
# To fix it, master will check if all gtids are in the set of (gtid_executed, |
| 15 |
# owned_gtids). |
| 16 |
################################################################################ |
| 17 |
--source include/not_group_replication_plugin.inc |
| 18 |
--source include/have_debug_sync.inc |
| 19 |
--source include/have_binlog_format_row.inc |
| 20 |
--source include/master-slave.inc |
| 21 |
|
| 22 |
CREATE TABLE t1(c1 INT); |
| 23 |
|
| 24 |
# The transaction will not commit until it get 'continue' signal. |
| 25 |
SET debug_sync = "bgc_after_sync_stage_before_commit_stage SIGNAL synced WAIT_FOR continue"; |
| 26 |
--send INSERT INTO t1 VALUES(1) |
| 27 |
|
| 28 |
--let $rpl_connection_name= default |
| 29 |
--source include/rpl_connection.inc |
| 30 |
SET debug_sync = "now WAIT_FOR synced"; |
| 31 |
|
| 32 |
--source include/sync_slave_sql_with_master.inc |
| 33 |
# After the transaction is replicated, io thread should be able to connect. |
| 34 |
--source include/stop_slave_io.inc |
| 35 |
--source include/start_slave_io.inc |
| 36 |
|
| 37 |
--let $rpl_connection_name= default |
| 38 |
--source include/rpl_connection.inc |
| 39 |
SET debug_sync = "now SIGNAL continue"; |
| 40 |
|
| 41 |
--source include/rpl_connection_master.inc |
| 42 |
--reap |
| 43 |
INSERT INTO t1 VALUES(2); |
| 44 |
DROP TABLE t1; |
| 45 |
|
| 46 |
--source include/rpl_end.inc |