mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sql parser & wall filter
This commit is contained in:
@@ -642,6 +642,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
boolean full = false;
|
||||
if (lexer.token() == Token.FULL) {
|
||||
lexer.nextToken();
|
||||
full = true;
|
||||
}
|
||||
|
||||
if (identifierEquals("PROCESSLIST")) {
|
||||
@@ -651,7 +652,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
return stmt;
|
||||
}
|
||||
|
||||
if (identifierEquals("COLUMNS")) {
|
||||
if (identifierEquals("COLUMNS") || identifierEquals("FIELDS")) {
|
||||
lexer.nextToken();
|
||||
|
||||
MySqlShowColumnsStatement stmt = parseShowColumns();
|
||||
|
||||
+2
-2
@@ -422,7 +422,7 @@ public class MySqlSchemaStatVisitor extends SchemaStatVisitor implements MySqlAS
|
||||
|
||||
@Override
|
||||
public boolean visit(MySqlShowColumnsStatement x) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1283,7 +1283,7 @@ public class MySqlSchemaStatVisitor extends SchemaStatVisitor implements MySqlAS
|
||||
public boolean visit(MySqlAlterTableImportTablespace x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(MySqlAlterTableImportTablespace x) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user