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
close #9587
  • Loading branch information
GMHDBJD authored Sep 8, 2023
1 parent b9a647d commit 2e8893a
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 @@ -2886,8 +2886,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 2e8893a

Please sign in to comment.