Skip to content

Suppport CURRENT_TIMESTAMP with pricision - #10

Open
akihiro17 wants to merge 1 commit into
square:masterfrom
akihiro17:support-current-timestamp-with-pricision
Open

Suppport CURRENT_TIMESTAMP with pricision#10
akihiro17 wants to merge 1 commit into
square:masterfrom
akihiro17:support-current-timestamp-with-pricision

Conversation

@akihiro17

Copy link
Copy Markdown

This PR fixes the following error when parsing the CURRENT_TIMESTAMP with pricision.

CREATETABLEt1
(
ts timestamp(6) DEFAULT CURRENT_TIMESTAMP(6) ONUPDATECURRENT_TIMESTAMP(6),
dt datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ONUPDATECURRENT_TIMESTAMP(6)
)
Failure/Error: do_parse
Racc::ParseError:
parse error on value "(" (S_LEFT_PAREN)
# (eval):3:in `_racc_do_parse_c'
# (eval):3:in `do_parse'
# ./lib/mysql-parser/lexer.rb:29:in `scan_str'
# mysql.y.rb:1349:in `parse'
# ./spec/parser_spec.rb:192:in `block (2 levels) in <class:MySQLParserTester>'

ref. https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html

@akihiro17

Copy link
Copy Markdown
Author

@michaelfinch What do you think about this change?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@akihiro17