Logged during binlog rotation or checkpoints, this event lists the GTIDs present in the binary log to help replicas determine their replication state.
Logged in every binlog to record the current replication state. Consists of the last GTID seen for each replication domain.
The Global Transaction ID, GTID for short, consists of three components:
Replication domain ID;
Master server ID;
Sequence ID.
It's represented as three numbers separated with dashes (-); for example: 1-1222-1011 .
It's usually written after the . If binary log encryption is enabled, it is written after the .
Event type is 163 (0xa3).
Number of GTIDs.
For (i=0; i < gtid_count; i++):
Replication Domain ID.
Server_ID.
The minimum content size for one GTID is 4 + (4 + 4 + 8) * 1 = 20 bytes .
From the utility:
170824 9:52:04 server id 10124 end_log_pos 292 CRC32 0xb6d8f0a8 Gtid list [0-10124-3584]
Event Time = a4 85 9e 59 ===> 2017-08-24 9:52:04.
Event Type = a3 => 163.
Server_id = 8c 27 00 00 => 00 00 27 8c => 10124.
Event Size = 2b => 43 (header[19] + 1 GTID(20 bytes) + CRC32[4].
The content example with one GTID is 20 bytes + 4 bytes CRC32:
Number of GTIDs[4] = 01 00 00 00 => 1.
GTID[0] replication_domain[4] = 00 00 00 00 => 0.
GTID[0] Server_id[4] = 8c 27 00 00 => 00 00 27 8c => 10124.
GTID[0] Sequence[8] = 00 0e 00 00 00 00 00 00 ===> 3584.
This page is licensed: CC BY-SA / Gnu FDL
uint<8> GTID sequence.
Flags = 00 => 0.
crc32[4] = a8 f0 d8 b6 => b6 d8 f0 a8 => 0xb6d8f0a8.
a4 85 9e 59 a3 8c 27 00 00 2b 00 00 00 24 01 00 ...Y..'..+...$..
00 00 00 01 00 00 00 00 00 00 00 8c 27 00 00 00 ............'...
0e 00 00 00 00 00 00 a8 f0 d8 b6 ..........