File: rpl_gtid_dump_error.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (46 lines) | stat: -rw-r--r-- 1,897 bytes parent folder | download
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
################################################################################
# Bug#20464737 SEMI_SYNC: SLAVE IO FAILS WITH ER1236 'SLAVE HAS MORE GTIDS THAN
#              THE MASTER HAS'
#
# Slaves, especially semisync slaves, encountered ER1236 when connecting to
# their masters. When connecting to the master with COM_GTID_DUMP request,
# the slave sends all replicated gtids to master and master checks if all the
# slave gtids(only the gtids have master's uuid) are included in master's
# gtid_executed. However, there is a chance that a gtid is already in slave's
# gtid_executed, but not in master's gtid_executed. Gtid is added into
# gtid_executed after it is binlogged, so it is possible that a transaction is
# replicated and applied on slave, but not committed on master yet.
#
# To fix it, master will check if all gtids are in the set of (gtid_executed,
# owned_gtids).
################################################################################
--source include/not_group_replication_plugin.inc
--source include/have_debug_sync.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc

CREATE TABLE t1(c1 INT);

# The transaction will not commit until it get 'continue' signal.
SET debug_sync = "bgc_after_sync_stage_before_commit_stage SIGNAL synced WAIT_FOR continue";
--send INSERT INTO t1 VALUES(1)

--let $rpl_connection_name= default
--source include/rpl_connection.inc
SET debug_sync = "now WAIT_FOR synced";

--source include/sync_slave_sql_with_master.inc
# After the transaction is replicated, io thread should be able to connect.
--source include/stop_slave_io.inc
--source include/start_slave_io.inc

--let $rpl_connection_name= default
--source include/rpl_connection.inc
SET debug_sync = "now SIGNAL continue";

--source include/rpl_connection_master.inc
--reap
INSERT INTO t1 VALUES(2);
DROP TABLE t1;

--source include/rpl_end.inc