mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser for mysql explain. for issue #1645
This commit is contained in:
@@ -2087,6 +2087,15 @@ public class SQLStatementParser extends SQLParser {
|
||||
explain.setHints(this.exprParser.parseHints());
|
||||
}
|
||||
|
||||
if (JdbcConstants.MYSQL.equals(dbType)) {
|
||||
if (identifierEquals("FORMAT")
|
||||
|| identifierEquals("EXTENDED")
|
||||
|| identifierEquals("PARTITIONS")) {
|
||||
explain.setType(lexer.stringVal);
|
||||
lexer.nextToken();
|
||||
}
|
||||
}
|
||||
|
||||
explain.setStatement(parseStatement());
|
||||
|
||||
return explain;
|
||||
|
||||
Reference in New Issue
Block a user