Skip to content

Commit

Permalink
add autoid_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
AilinKid committed Mar 13, 2020
1 parent 7e606be commit 95fad7b
Show file tree
Hide file tree
Showing 5 changed files with 8,507 additions and 3,598 deletions.
5 changes: 5 additions & 0 deletions ast/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,7 @@ const (
TableOptionCharset
TableOptionCollate
TableOptionAutoIncrement
TableOptionAutoIncrementCache
TableOptionComment
TableOptionAvgRowLength
TableOptionCheckSum
Expand Down Expand Up @@ -1850,6 +1851,10 @@ func (n *TableOption) Restore(ctx *format.RestoreCtx) error {
ctx.WriteKeyWord("AUTO_INCREMENT ")
ctx.WritePlain("= ")
ctx.WritePlainf("%d", n.UintValue)
case TableOptionAutoIncrementCache:
ctx.WriteKeyWord("AUTO_INCREMENT_CACHE ")
ctx.WritePlain("= ")
ctx.WritePlainf("%d", n.UintValue)
case TableOptionComment:
ctx.WriteKeyWord("COMMENT ")
ctx.WritePlain("= ")
Expand Down
1 change: 1 addition & 0 deletions misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ var tokenMap = map[string]int{
"ASC": asc,
"ASCII": ascii,
"AUTO_INCREMENT": autoIncrement,
"AUTO_INCREMENT_CACHE": autoIncrementCache,
"AUTO_RANDOM": autoRandom,
"AVG": avg,
"AVG_ROW_LENGTH": avgRowLength,
Expand Down
Loading

0 comments on commit 95fad7b

Please sign in to comment.