File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -937,6 +937,10 @@ AlterTableSpec:
937
937
}
938
938
}
939
939
940
+ LockClauseOpt :
941
+ {}
942
+ | LockClause {}
943
+
940
944
LockClause :
941
945
" LOCK" eq " NONE"
942
946
{
@@ -1448,7 +1452,7 @@ NumLiteral:
1448
1452
1449
1453
1450
1454
CreateIndexStmt :
1451
- " CREATE" CreateIndexStmtUnique " INDEX" Identifier IndexTypeOpt " ON" TableName ' (' IndexColNameList ' )' IndexOptionList
1455
+ " CREATE" CreateIndexStmtUnique " INDEX" Identifier IndexTypeOpt " ON" TableName ' (' IndexColNameList ' )' IndexOptionList LockClauseOpt
1452
1456
{
1453
1457
var indexOption *ast.IndexOption
1454
1458
if $11 != nil {
Original file line number Diff line number Diff line change @@ -1474,6 +1474,7 @@ func (s *testParserSuite) TestDDL(c *C) {
1474
1474
{"CREATE INDEX idx ON t (a) USING HASH" , true },
1475
1475
{"CREATE INDEX idx ON t (a) COMMENT 'foo'" , true },
1476
1476
{"CREATE INDEX idx ON t (a) USING HASH COMMENT 'foo'" , true },
1477
+ {"CREATE INDEX idx ON t (a) LOCK=NONE" , true },
1477
1478
{"CREATE INDEX idx USING BTREE ON t (a) USING HASH COMMENT 'foo'" , true },
1478
1479
{"CREATE INDEX idx USING BTREE ON t (a)" , true },
1479
1480
You can’t perform that action at this time.
0 commit comments