Skip to content

ALTER TABLE … MODIFY … ENUM('<reserved_keyword>') is being wrongly parsed. #478

Closed
@niconoe-

Description

@niconoe-

When trying to parse a statement like this:

ALTER TABLE `MY_TABLE` 
MODIFY `FOO` INT(11) NULL,
MODIFY `MY_COLUMN` ENUM('INSERT','UPDATE','DELETE','REPLACE') NULL,
MODIFY `BAR` VARCHAR(255) NULL;

SQL-Parser fails because it considers each value of the enum as a real keyword, instead of a simple string. Hence, next operations on the ALTER TABLE statements are not understood correctly, and it makes fail the parser.
This causes:

#n: A new statement was found, but no delimiter between it and the previous one. (near "&#039;INSERT&#039;" at position xxx)

Thanks 🙂

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions