File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ func (s *session) parserBinlog(ctx context.Context) {
308
308
}
309
309
310
310
// log.Errorf("binlog pos: %d", int(currentPosition.Pos))
311
- // log.Errorf("binlog pos : %v" , e.Header.EventType.String())
311
+ // log.Errorf("binlog type : %#v,%#v", e.Header.EventType , e.Header.EventType.String())
312
312
// log.Errorf("currentThreadID: %v", currentThreadID)
313
313
// e.Dump(os.Stdout)
314
314
// os.Stdout.Sync()
@@ -389,11 +389,14 @@ func (s *session) parserBinlog(ctx context.Context) {
389
389
// if (record.StageStatus == StatusExecFail && record.AffectedRows > 0) ||
390
390
// record.StageStatus == StatusExecOK || record.StageStatus == StatusBackupFail {
391
391
if record .AffectedRows > 0 {
392
- record .StageStatus = StatusBackupOK
392
+ if changeRows >= record .AffectedRows {
393
+ record .StageStatus = StatusBackupOK
394
+ }
393
395
}
394
396
395
397
record .BackupCostTime = fmt .Sprintf ("%.3f" , time .Since (startTime ).Seconds ())
396
398
399
+ changeRows = 0
397
400
next := s .getNextBackupRecord ()
398
401
if next != nil {
399
402
startPosition = mysql.Position {Name : next .StartFile ,
You can’t perform that action at this time.
0 commit comments