Skip to content

Commit

Permalink
fix make vet
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed Dec 8, 2018
1 parent 0aef448 commit d3a1c36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ddl/ddl_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions ddl/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d3a1c36

Please sign in to comment.