Closed
Description
Parsing the following statement will result in an error
new Parser('ALTER TABLE `demo` ADD KEY `IDX_REPAIR` (`REPAIR`);', true);
Problem is the check
elseif (! empty(Parser::$STATEMENT_PARSERS[$token->value]))
in the parse function in AlterOperation class. But as far as I understand it is allowed to use keywords as column names if you quote them.
How can we fix the problem? The easiest would be just to remove the check in the parse function. Another one would be to add an additional attribute to a token which tells if it was quoted. In case this is true, keywords are allowed as names and we skip the additional statement error checks in the parser for that token. What do you think?