mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved mysql parser add_index support. for issue #1645
This commit is contained in:
@@ -2126,6 +2126,16 @@ public class SQLStatementParser extends SQLParser {
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
item.setName(this.exprParser.name());
|
||||
|
||||
if (JdbcConstants.MYSQL.equals(dbType)) {
|
||||
if (identifierEquals("USING")) {
|
||||
lexer.nextToken();
|
||||
String indexType = lexer.stringVal;
|
||||
item.setType(indexType);
|
||||
accept(Token.IDENTIFIER);
|
||||
}
|
||||
}
|
||||
|
||||
accept(Token.LPAREN);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user