From d3a1c36ba067e598badcd2a8e8ba930fdb927079 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Sun, 9 Dec 2018 01:05:20 +0800 Subject: [PATCH] fix make vet --- ddl/ddl_api.go | 2 +- ddl/partition.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ddl/ddl_api.go b/ddl/ddl_api.go index 91ab9c55989bd..5f87fe55c3b7c 100644 --- a/ddl/ddl_api.go +++ b/ddl/ddl_api.go @@ -1435,7 +1435,7 @@ func (d *ddl) TruncateTablePartition(ctx sessionctx.Context, ident ast.Ident, sp return errors.Trace(ErrPartitionMgmtOnNonpartitioned) } - if err := checkPartitionExist(meta, spec.Name); err != nil { + if err = checkPartitionExist(meta, spec.Name); err != nil { return errors.Trace(err) } diff --git a/ddl/partition.go b/ddl/partition.go index 8d92f4e862d85..665d22544d876 100644 --- a/ddl/partition.go +++ b/ddl/partition.go @@ -397,9 +397,9 @@ func onTruncateTablePartition(t *meta.Meta, job *model.Job) (int64, error) { for i := 0; i < len(pi.Definitions); i++ { def := &pi.Definitions[i] if strings.EqualFold(def.Name.L, strings.ToLower(partName)) { - pid, err := t.GenGlobalID() + pid, err1 := t.GenGlobalID() if err != nil { - return ver, errors.Trace(err) + return ver, errors.Trace(err1) } oldID = def.ID def.ID = pid