Skip to content

Commit c0801a7

Browse files
committed
fixes #718
1 parent 22c0494 commit c0801a7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ Not all names should be allowed for aliases.
10381038
String RelObjectNameWithoutValue() :
10391039
{ Token tk = null; }
10401040
{
1041-
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER> | tk=<K_BYTE> | <K_CHAR>
1041+
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER> | tk=<K_BYTE> | tk=<K_CHAR>
10421042
| tk=<K_CAST> | tk=<K_COMMENT> | tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FIRST> | tk=<K_FOLLOWING>
10431043
| tk=<K_LAST> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>
10441044
| tk=<K_ROW> | tk=<K_ROWS> | tk=<K_SIBLINGS> | tk=<K_XML>

src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3279,6 +3279,11 @@ public void testNotNotIssue() throws JSQLParserException {
32793279
assertSqlCanBeParsedAndDeparsed("SELECT VALUE1, VALUE2 FROM FOO WHERE NOT BAR LIKE '*%'");
32803280
}
32813281

3282+
@Test
3283+
public void testCharNotParsedIssue718() throws JSQLParserException {
3284+
assertSqlCanBeParsedAndDeparsed("SELECT a FROM x WHERE a LIKE '%' + char(9) + '%'");
3285+
}
3286+
32823287
@Test
32833288
public void testRawStringExpressionIssue656() throws JSQLParserException {
32843289
for (String c : new String[]{"u", "e", "n", "r", "b", "rb"}) {

0 commit comments

Comments
 (0)