-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
DDLDDL statement relatedDDL statement relatedMySQLMySQL specific issueMySQL specific issueSponsor needed
Description
Failing SQL Feature:
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:
ALTER TABLE `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.
Metadata
Metadata
Assignees
Labels
DDLDDL statement relatedDDL statement relatedMySQLMySQL specific issueMySQL specific issueSponsor needed