|
|
@ -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 {
|
|
|
|