Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
  • Loading branch information
wjhuang2016 committed Dec 7, 2021
1 parent 506e1fd commit a5e6798
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions executor/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,13 +862,13 @@ func ConstructResultOfShowCreateTable(ctx sessionctx.Context, tableInfo *model.T
buf.WriteString(" VIRTUAL")
}
}
if mysql.HasNotNullFlag(col.Flag) {
buf.WriteString(" NOT NULL")
}
if mysql.HasAutoIncrementFlag(col.Flag) {
hasAutoIncID = true
buf.WriteString(" AUTO_INCREMENT")
buf.WriteString(" NOT NULL AUTO_INCREMENT")
} else {
if mysql.HasNotNullFlag(col.Flag) {
buf.WriteString(" NOT NULL")
}
// default values are not shown for generated columns in MySQL
if !mysql.HasNoDefaultValueFlag(col.Flag) && !col.IsGenerated() {
defaultValue := col.GetDefaultValue()
Expand Down

0 comments on commit a5e6798

Please sign in to comment.