mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser. for issue #2082
This commit is contained in:
@@ -3391,6 +3391,11 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
// " " + lexer.stringVal());
|
||||
SQLAlterTableAddIndex item = parseAlterTableAddIndex();
|
||||
item.setParent(stmt);
|
||||
stmt.addItem(item);
|
||||
} else if (lexer.token() == Token.FOREIGN) {
|
||||
MysqlForeignKey fk = this.getExprParser().parseForeignKey();
|
||||
SQLAlterTableAddConstraint item = new SQLAlterTableAddConstraint(fk);
|
||||
|
||||
stmt.addItem(item);
|
||||
} else if (lexer.token() == Token.CONSTRAINT) {
|
||||
lexer.nextToken();
|
||||
|
||||
Reference in New Issue
Block a user