Skip to content

Commit

Permalink
dm: track table schema for online ddl when use binlog skip (#9700) (#…
Browse files Browse the repository at this point in the history
…9705)

close #9587
  • Loading branch information
ti-chi-bot authored Nov 20, 2023
1 parent 7396a87 commit 99594c1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dm/syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2857,8 +2857,18 @@ func (s *Syncer) trackOriginDDL(ev *replication.QueryEvent, ec eventContext) (ma
return nil, err
}

affectedTbls := make(map[string]map[string]struct{})
for _, sql := range qec.splitDDLs {
sqls, err := s.ddlWorker.processOneDDL(qec, sql)
if err != nil {
s.tctx.L().Warn("processOneDDL failed", zap.Error(err))
qec.appliedDDLs = append(qec.appliedDDLs, sql)
} else {
qec.appliedDDLs = append(qec.appliedDDLs, sqls...)
}
}

affectedTbls := make(map[string]map[string]struct{})
for _, sql := range qec.appliedDDLs {
ddlInfo, err := s.ddlWorker.genDDLInfo(qec, sql)
if err != nil {
return nil, err
Expand Down

0 comments on commit 99594c1

Please sign in to comment.