Skip to content

Commit

Permalink
syncer: fix the error message about executing multiple DDLs (pingcap#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm authored and csuzhangxc committed Mar 28, 2019
1 parent 07cf58a commit 3941bee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syncer/sharding_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (sg *ShardingGroup) Merge(sources []string) (bool, bool, int, error) {
if !synced {
sg.remain--
} else if !utils.CompareShardingDDLs(sg.sourceDDLs[source], ddls) {
return isResolving, sg.remain <= 0, sg.remain, errors.NotSupportedf("execute multiple ddls: previous ddl %s and current ddl %s for source table %s", sg.sourceDDLs[source], ddl, source)
return isResolving, sg.remain <= 0, sg.remain, errors.NotSupportedf("execute multiple ddls: previous ddl %s and current ddls %q for source table %s", sg.sourceDDLs[source], ddls, source)
}
}

Expand Down Expand Up @@ -211,7 +211,7 @@ func (sg *ShardingGroup) TrySync(source string, pos, endPos mysql.Position, ddls
sg.sources[source] = true
sg.sourceDDLs[source] = ddls
} else if !utils.CompareShardingDDLs(sg.sourceDDLs[source], ddls) {
return sg.remain <= 0, sg.remain, errors.NotSupportedf("execute multiple ddls: previous ddl %s and current ddl %s for source table %s", sg.sourceDDLs[source], ddl, source)
return sg.remain <= 0, sg.remain, errors.NotSupportedf("execute multiple ddls: previous ddl %s and current ddls %q for source table %s", sg.sourceDDLs[source], ddls, source)
}

if sg.firstPos == nil {
Expand Down

0 comments on commit 3941bee

Please sign in to comment.