} else if (identifierEquals("REMOVE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals(ENGINE)) {
lexer.nextToken();
accept(Token.EQ);
stmt.getItems().add(new MySqlAlterTableOption(ENGINE, lexer.stringVal()));
lexer.nextToken();
} else if (identifierEquals(AUTO_INCREMENT)) {
lexer.nextToken();
accept(Token.EQ);
stmt.getItems().add(new MySqlAlterTableOption(AUTO_INCREMENT, lexer.integerValue()));
lexer.nextToken();
} else if (identifierEquals(COLLATE2)) {
lexer.nextToken();
accept(Token.EQ);
stmt.getItems().add(new MySqlAlterTableOption(COLLATE2, lexer.stringVal()));
lexer.nextToken();
} else if (identifierEquals("PACK_KEYS")) {
lexer.nextToken();
accept(Token.EQ);
if (identifierEquals("PACK")) {
lexer.nextToken();
accept(Token.ALL);
stmt.getItems().add(new MySqlAlterTableOption("PACK_KEYS", "PACK ALL"));
} else {
stmt.getItems().add(new MySqlAlterTableOption("PACK_KEYS", lexer.stringVal()));
lexer.nextToken();
}
} else if (identifierEquals(CHARACTER)) {
lexer.nextToken();
accept(Token.SET);
accept(Token.EQ);
MySqlAlterTableCharacter item = new MySqlAlterTableCharacter();
item.setCharacterSet(this.exprParser.primary());
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
acceptIdentifier(COLLATE2);
accept(Token.EQ);
item.setCollate(this.exprParser.primary());
}
stmt.getItems().add(item);
} else if (lexer.token() == Token.COMMENT) {
lexer.nextToken();
if(lexer.token() == Token.EQ) {
accept(Token.EQ);
}
stmt.getItems().add(new MySqlAlterTableOption("COMMENT", '\'' + lexer.stringVal() + '\''));
lexer.nextToken();
}else {
break;
}