From 3941bee87036506f34207f9583930fff82f17dc2 Mon Sep 17 00:00:00 2001 From: kennytm Date: Thu, 28 Mar 2019 20:22:42 +0800 Subject: [PATCH] syncer: fix the error message about executing multiple DDLs (#95) --- syncer/sharding_group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncer/sharding_group.go b/syncer/sharding_group.go index bc4aadea55..1dd9ace90e 100644 --- a/syncer/sharding_group.go +++ b/syncer/sharding_group.go @@ -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) } } @@ -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 {