diff --git a/cdc/model/sink.go b/cdc/model/sink.go index 96f3e4163b1..920aa19a36c 100644 --- a/cdc/model/sink.go +++ b/cdc/model/sink.go @@ -1061,6 +1061,10 @@ func (d *DDLEvent) FromJobWithArgs( d.Query = fmt.Sprintf("ALTER TABLE `%s`.`%s` EXCHANGE PARTITION `%s` WITH TABLE `%s`.`%s`", tableInfo.TableName.Schema, tableInfo.TableName.Table, partName, preTableInfo.TableName.Schema, preTableInfo.TableName.Table) + + if strings.HasSuffix(upperQuery, "WITHOUT VALIDATION") { + d.Query += " WITHOUT VALIDATION" + } default: d.Query = job.Query }