You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] 5.0 : MySQL : Parsing ALTER TABLE statement with CHARACTER SET fails #2027
Trying to parse an ALTER TABLE statement for MySQL fails when the column definition contains the CHARACTER SET keywords.
Encountering the following error
ParseException: Encountered unexpected token: "SET" "SET"
at line 2, column 55.
Was expecting one of:
","
<EOF>
<ST_SEMICOLON>
SQL Example:
ALTERTABLE`foo_bar`
ADD COLUMN `baz`text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
ALGORITHM = INSTANT;
Software Information:
JSqlParser version: 5.0
Database MySQL
Writing in Scala, though that shouldn't affect anything 🤞
Additional information
The failing code is
CCJSqlParserUtil.parseStatements(fileContent)
where fileContent is a String containing the entire content of the SQL file.
Activity
manticore-projects commentedon Jul 1, 2024
Greetings.
a PR was needed and you would need to either provide or sponsor this specific implementation.