master
兔子 2 years ago
parent 7c0272cc62
commit 304b5c10a3

@ -372,6 +372,9 @@ func parseBinlogWithFilter(r io.Reader, parse *replication.BinlogParser, filter
for { for {
headBuf := make([]byte, replication.EventHeaderSize) headBuf := make([]byte, replication.EventHeaderSize)
if _, err = io.ReadFull(r, headBuf); err == io.EOF { if _, err = io.ReadFull(r, headBuf); err == io.EOF {
if tx.Time.IsZero() {
return nil
}
idx := 0 idx := 0
for k, v := range tx.Txs { for k, v := range tx.Txs {
if v.SqlType != "query" && len(tx.sqlOrigin) > idx { if v.SqlType != "query" && len(tx.sqlOrigin) > idx {
@ -482,6 +485,7 @@ func parseBinlogWithFilter(r io.Reader, parse *replication.BinlogParser, filter
} }
tx.Size = tx.EndPos - tx.StartPos tx.Size = tx.EndPos - tx.StartPos
callFn(tx) callFn(tx)
tx = Transaction{}
} }
currentGtid = ev.Data currentGtid = ev.Data
if inGtid != nil { if inGtid != nil {

Loading…
Cancel
Save