|
|
|
@ -238,7 +238,7 @@ func ParseBinlogEvent(ev *replication.BinlogEvent) []BinlogEvent {
|
|
|
|
|
case replication.WRITE_ROWS_EVENTv1,
|
|
|
|
|
replication.WRITE_ROWS_EVENTv2:
|
|
|
|
|
wrEvent := ev.Event.(*replication.RowsEvent)
|
|
|
|
|
sig.TB = string(wrEvent.Table.Schema)
|
|
|
|
|
sig.DB = string(wrEvent.Table.Schema)
|
|
|
|
|
sig.TB = string(wrEvent.Table.Table)
|
|
|
|
|
sig.Type = "insert"
|
|
|
|
|
sig.RowCnt = uint32(len(wrEvent.Rows))
|
|
|
|
@ -247,7 +247,7 @@ func ParseBinlogEvent(ev *replication.BinlogEvent) []BinlogEvent {
|
|
|
|
|
replication.UPDATE_ROWS_EVENTv2:
|
|
|
|
|
wrEvent := ev.Event.(*replication.RowsEvent)
|
|
|
|
|
sig.DB = string(wrEvent.Table.Schema)
|
|
|
|
|
sig.DB = string(wrEvent.Table.Table)
|
|
|
|
|
sig.TB = string(wrEvent.Table.Table)
|
|
|
|
|
sig.Type = "update"
|
|
|
|
|
sig.RowCnt = uint32(len(wrEvent.Rows)) / 2
|
|
|
|
|
sig.Rows = wrEvent.Rows
|
|
|
|
@ -466,6 +466,9 @@ func parseBinlogWithFilter(r io.Reader, parse *replication.BinlogParser, filter
|
|
|
|
|
tx.RowsCount += v.RowCount
|
|
|
|
|
tx.Txs[k] = v
|
|
|
|
|
}
|
|
|
|
|
if filter.OnlyShowGtid {
|
|
|
|
|
tx.EndPos = startPos - 1
|
|
|
|
|
}
|
|
|
|
|
tx.Size = tx.EndPos - tx.StartPos
|
|
|
|
|
callFn(tx)
|
|
|
|
|
}
|
|
|
|
|