mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
mysql parser bug fixed
This commit is contained in:
@@ -797,7 +797,26 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
|
||||
println();
|
||||
print(x.getOperator().name);
|
||||
println();
|
||||
x.getRight().accept(this);
|
||||
|
||||
boolean needParen = false;
|
||||
|
||||
if (x.getOrderBy() != null) {
|
||||
needParen = true;
|
||||
}
|
||||
|
||||
if (needParen) {
|
||||
print('(');
|
||||
x.getRight().accept(this);
|
||||
print(')');
|
||||
} else {
|
||||
x.getRight().accept(this);
|
||||
}
|
||||
|
||||
if (x.getOrderBy() != null) {
|
||||
println();
|
||||
x.getOrderBy().accept(this);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user