binlog-parser
binlog-parser copied to clipboard
Add GTID support
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