Skip to content

Commit 1b5d24d

Browse files
committed
fixes #592
1 parent 2cea3ee commit 1b5d24d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ String RelObjectNameWithoutValue() :
962962
| tk=<K_OPEN> | tk=<K_OVER> | tk=<K_PERCENT> | tk=<K_PRIOR>
963963
| tk=<K_SEPARATOR> | tk=<K_NO> | tk=<K_ACTION> | tk=<K_CASCADE> | tk=<K_END>
964964
| tk=<K_TABLE> | tk=<K_DATETIMELITERAL> | tk=<K_COMMIT> | tk=<K_PRECISION>
965-
| tk=<K_INSERT> | tk=<K_INDEX> | tk=<K_PRIMARY>
965+
| tk=<K_INSERT> | tk=<K_INDEX> | tk=<K_PRIMARY> | tk=<K_ENABLE>
966966
)
967967

968968
{ return tk.image; }
@@ -2050,7 +2050,7 @@ Expression RegularCondition() #RegularCondition:
20502050
| "?" { result = new JsonOperator("?"); }
20512051
| "?|" { result = new JsonOperator("?|"); }
20522052
| "?&" { result = new JsonOperator("?&"); }
2053-
| "||" { result = new JsonOperator("||"); }
2053+
| <OP_CONCAT> { result = new JsonOperator("||"); }
20542054
| "-" { result = new JsonOperator("-"); }
20552055
| "-#" { result = new JsonOperator("-#"); }
20562056
)

src/test/java/net/sf/jsqlparser/test/insert/InsertTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,8 @@ public void testInsertTableWithAliasIssue526() throws JSQLParserException {
272272
assertSqlCanBeParsedAndDeparsed("INSERT INTO account t (name, addr, phone) SELECT * FROM user");
273273
}
274274

275+
@Test
276+
public void testInsertKeyWordEnableIssue592() throws JSQLParserException {
277+
assertSqlCanBeParsedAndDeparsed("INSERT INTO T_USER (ID, EMAIL_VALIDATE, ENABLE, PASSWORD) VALUES (?, ?, ?, ?)");
278+
}
275279
}

0 commit comments

Comments
 (0)