Skip to content

Commit

Permalink
parser: fix now frac in column option (pingcap#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-Git authored and tiancaiamao committed Apr 18, 2019
1 parent 74c4705 commit 50dda70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions parser.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -1625,8 +1625,7 @@ ColumnOption:
}
| "ON" "UPDATE" NowSymOptionFraction
{
nowFunc := &ast.FuncCallExpr{FnName: model.NewCIStr("CURRENT_TIMESTAMP")}
$$ = &ast.ColumnOption{Tp: ast.ColumnOptionOnUpdate, Expr: nowFunc}
$$ = &ast.ColumnOption{Tp: ast.ColumnOptionOnUpdate, Expr: $3}
}
| "COMMENT" stringLit
{
Expand Down

0 comments on commit 50dda70

Please sign in to comment.