From f52fead10f0e60515c3ce610644e4e42018f87ea Mon Sep 17 00:00:00 2001 From: GMHDBJD <35025882+GMHDBJD@users.noreply.github.com> Date: Fri, 8 Sep 2023 12:08:14 +0800 Subject: [PATCH] This is an automated cherry-pick of #9700 Signed-off-by: ti-chi-bot --- dm/syncer/syncer.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dm/syncer/syncer.go b/dm/syncer/syncer.go index 16520d897cd..79a0028ac7f 100644 --- a/dm/syncer/syncer.go +++ b/dm/syncer/syncer.go @@ -2852,9 +2852,23 @@ 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 { +<<<<<<< HEAD ddlInfo, err := s.genDDLInfo(qec.p, qec.ddlSchema, sql) +======= + 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) +>>>>>>> 2e8893a67c (dm: track table schema for online ddl when use binlog skip (#9700)) if err != nil { return nil, err }