Skip to content

Commit

Permalink
fixes #1230
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Jun 26, 2021
1 parent 96cd483 commit 3082de3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -4191,8 +4191,6 @@ CreateSchema CreateSchema():
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER>) { schema.setAuthorization(tk.image); }
]

/* [ <K_DEFAULT> <K_CHARACTER> <K_SET> tk=<S_QUOTED_IDENTIFIER> | <S_IDENTIFIER> {} ] */

[schemaPath=PathSpecification() { schema.setSchemaPath(schemaPath); }]

(
Expand Down Expand Up @@ -4575,6 +4573,8 @@ List<String> CreateParameter():
)
{ param.add(retval); }
|
tk=<K_AS> { param.add(tk.image); }
|
tk=<K_ON> { param.add(tk.image); }
|
tk=<K_COMMIT> { param.add(tk.image); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -833,4 +833,10 @@ public void testCreateTempTableAsSelect() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed(
"CREATE TEMP TABLE T1 (C1, C2) AS SELECT C3, C4 FROM T2");
}

@Test
public void testCreateTableIssue1230() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed(
"CREATE TABLE TABLE_HISTORY (ID bigint generated by default as identity, CREATED_AT timestamp not null, TEXT varchar (255), primary key (ID))");
}
}

0 comments on commit 3082de3

Please sign in to comment.