From 6896bd12342fd0ab3098306b3b8584980e393c2c Mon Sep 17 00:00:00 2001 From: "duchuan.dc" Date: Mon, 23 Apr 2018 20:44:11 +0800 Subject: [PATCH] Code format refine --- ddl/ddl_api.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ddl/ddl_api.go b/ddl/ddl_api.go index 79370bebbfcea..7e8d6052939fa 100644 --- a/ddl/ddl_api.go +++ b/ddl/ddl_api.go @@ -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