mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for multi-tenant
This commit is contained in:
@@ -132,18 +132,21 @@ public class WallVisitorUtils {
|
||||
checkCondition(visitor, x.getWhere());
|
||||
|
||||
if (Boolean.TRUE == getValue(where)) {
|
||||
boolean isSimpleConstExpr = false;
|
||||
if (where instanceof SQLBinaryOpExpr) {
|
||||
SQLBinaryOpExpr binaryOpExpr = (SQLBinaryOpExpr) where;
|
||||
if (binaryOpExpr.getOperator() == SQLBinaryOperator.Equality
|
||||
|| binaryOpExpr.getOperator() == SQLBinaryOperator.NotEqual) {
|
||||
if (binaryOpExpr.getLeft() instanceof SQLIntegerExpr
|
||||
&& binaryOpExpr.getRight() instanceof SQLIntegerExpr) {
|
||||
return;
|
||||
isSimpleConstExpr = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addViolation(visitor, x);
|
||||
if (!isSimpleConstExpr) {
|
||||
addViolation(visitor, x);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user