Skip to content

Commit

Permalink
replication: Add GTID_TAGGED_LOG_EVENT
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Nov 13, 2024
1 parent 760b566 commit 4d0973a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions replication/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ const (
BINLOG_MARIADB_FL_DDL /*32 - FL_DDL is set for event group containing DDL*/
)

// See `Log_event_type` in binlog_event.h
// https://github.com/mysql/mysql-server/blob/trunk/libs/mysql/binlog/event/binlog_event.h

type EventType byte

const (
Expand Down Expand Up @@ -93,6 +96,7 @@ const (
PARTIAL_UPDATE_ROWS_EVENT
TRANSACTION_PAYLOAD_EVENT
HEARTBEAT_LOG_EVENT_V2
GTID_TAGGED_LOG_EVENT
)

const (
Expand Down Expand Up @@ -202,6 +206,8 @@ func (e EventType) String() string {
return "TransactionPayloadEvent"
case HEARTBEAT_LOG_EVENT_V2:
return "HeartbeatLogEventV2"
case GTID_TAGGED_LOG_EVENT:
return "Gtid_tagged_log_event"
case MARIADB_START_ENCRYPTION_EVENT:
return "MariadbStartEncryptionEvent"
case MARIADB_QUERY_COMPRESSED_EVENT:
Expand Down
2 changes: 2 additions & 0 deletions replication/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ func (p *BinlogParser) parseEvent(h *EventHeader, data []byte, rawData []byte) (
e = &IntVarEvent{}
case TRANSACTION_PAYLOAD_EVENT:
e = p.newTransactionPayloadEvent()
case GTID_TAGGED_LOG_EVENT:
e = &GTIDEvent{}
default:
e = &GenericEvent{}
}
Expand Down

0 comments on commit 4d0973a

Please sign in to comment.