Skip to content

Commit

Permalink
Code format refine
Browse files Browse the repository at this point in the history
  • Loading branch information
spongedu committed Apr 23, 2018
1 parent 8ef798a commit 6896bd1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ddl/ddl_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,7 @@ func checkDefaultValue(ctx sessionctx.Context, c *table.Column, hasDefaultValue
}

if c.DefaultValue != nil {
_, err := table.GetColDefaultValue(ctx, c.ToInfo())
if types.ErrTruncated.Equal(err) {
return types.ErrInvalidDefault.GenByArgs(c.Name)
}
if err != nil {
if _, err := table.GetColDefaultValue(ctx, c.ToInfo()); err != nil {
return errors.Trace(types.ErrInvalidDefault.GenByArgs(c.Name))
}
return nil
Expand Down

0 comments on commit 6896bd1

Please sign in to comment.