-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parser: support ALTER TABLE ALTER CHECK
, ALTER TABLE DROP CHECK
syntax
#505
Conversation
ALTER TABLE ALTER CHECK
, ALTER TABLE DROP CHECK
s…ALTER TABLE ALTER CHECK
, ALTER TABLE DROP CHECK
syntax
Codecov Report
@@ Coverage Diff @@
## master #505 +/- ##
=========================================
+ Coverage 71.56% 71.6% +0.03%
=========================================
Files 32 32
Lines 7703 7712 +9
=========================================
+ Hits 5513 5522 +9
Misses 1668 1668
Partials 522 522
Continue to review full report at Codecov.
|
LGTM |
@tangenta PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
parser.y
Outdated
@@ -1607,6 +1607,33 @@ AlterTableSpec: | |||
yylex.AppendError(yylex.Errorf("The WITH/WITHOUT VALIDATION clause is parsed but ignored by all storage engines.")) | |||
parser.lastErrorAsWarn() | |||
} | |||
| "ALTER" "CHECK" Identifier EnforcedOrNot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "ALTER" "CHECK" Identifier EnforcedOrNot | |
| "ALTER" "CHECK" Identifier EnforcedOrNot |
Sorry for my unclear suggestion. I mean here should be a tab, as most of the other productions.
parser_test.go
Outdated
@@ -2284,6 +2284,13 @@ func (s *testParserSuite) TestDDL(c *C) { | |||
{"ALTER TABLE t RENAME KEY a TO b;", true, "ALTER TABLE `t` RENAME INDEX `a` TO `b`"}, | |||
{"ALTER TABLE t RENAME INDEX a TO b;", true, "ALTER TABLE `t` RENAME INDEX `a` TO `b`"}, | |||
|
|||
// For #497 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this blank line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this blank line.
OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What problem does this PR solve?
for #497 , suport
ALTER TABLE ALTER CHECK
,ALTER TABLE DROP CHECK
syntax.Check List
Tests
Code changes
N / A
Side effects
N / A
Related changes
N / A