binlog-parser icon indicating copy to clipboard operation
binlog-parser copied to clipboard

Add GTID support

Open seruman opened this issue 4 years ago • 0 comments

Adds support for replication.GTID_EVENT. On GTID_EVENT, obtained GTID is associated with current RowsEventBuffer. When buffer drains and resets on XID_EVENT, it also resets its GTID value. This way only change events would have non-empty GTID values.

Tried to create a test fixture based on data/fixture/mysql-bin.01 with GTIDs enabled, which can be found at data/gtid-fixtures/ with it's SQL file. This binlog was generated with MySQL 5.7 with following mysqld flags:

--server-id=1
--log-bin=mysql-bin
--binlog-format=ROW
--gtid-mode=ON
--enforce-gtid-consistency
--log-slave-updates

seruman avatar Dec 07 '20 12:12 seruman