Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix: mysql comment with =
  • Loading branch information
jxnu-liguobin committed Dec 26, 2023
commit 4ff88aab8d0cde1e6053d823cdc8ee4a4799e8d2
2 changes: 1 addition & 1 deletion src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -6500,7 +6500,7 @@ AlterExpression AlterExpression():
)
|
(<K_COMMENT> {alterExp.setOperation(AlterOperation.COMMENT);}
["="]{alterExp.setOperation(AlterOperation.COMMENT_WITH_EQUAL_SIGN);}
["=" {alterExp.setOperation(AlterOperation.COMMENT_WITH_EQUAL_SIGN);} ]
tk=<S_CHAR_LITERAL> { alterExp.setCommentText(tk.image); }
)
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ public void testAlterTableDropColumnIfExists() throws JSQLParserException {
@Test
public void testAlterTableCommentIssue1935() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("ALTER TABLE table_name COMMENT = 'New table comment'");
assertSqlCanBeParsedAndDeparsed("ALTER TABLE table_name COMMENT 'New table comment'");
}

@Test
Expand Down