bug fixed for multi-tenant

This commit is contained in:
wenshao
2013-02-05 18:42:36 +08:00
parent cd5052f179
commit 6dd5510b3b
2 changed files with 62 additions and 2 deletions
@@ -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);
}
}
}