|
|
|
@ -346,6 +346,7 @@ type BinlogFilter struct {
|
|
|
|
|
BigThan int
|
|
|
|
|
SmallThan int
|
|
|
|
|
OnlyShowGtid bool
|
|
|
|
|
OnlyShowDML bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func parseBinlogWithFilter(r io.Reader, parse *replication.BinlogParser, filter BinlogFilter, fn func(Transaction) bool) error {
|
|
|
|
@ -449,7 +450,7 @@ func parseBinlogWithFilter(r io.Reader, parse *replication.BinlogParser, filter
|
|
|
|
|
if filter.SmallThan != 0 && filter.SmallThan < tx.Size {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
if !filter.OnlyShowGtid && tx.validSchemaCount == 0 {
|
|
|
|
|
if !filter.OnlyShowGtid && filter.OnlyShowDML && tx.validSchemaCount == 0 {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
return fn(tx)
|
|
|
|
|