improve sql wall

This commit is contained in:
wenshao
2013-08-29 14:31:21 +08:00
parent 40ccaee0e3
commit d179a8752e
9 changed files with 158 additions and 38 deletions
@@ -228,11 +228,11 @@ public class WallVisitorUtils {
Object whereValue = getConditionValue(visitor, where, visitor.getConfig().isSelectWhereAlwayTrueCheck());
if (queryBlockFromIsNull(visitor, x, false) && whereValue != null) {
addViolation(visitor, ErrorCode.EMPTY_QUERY_HAS_CONDITION, "empty select has condition", x);
}
if (Boolean.TRUE == whereValue) {
if (queryBlockFromIsNull(visitor, x, false)) {
addViolation(visitor, ErrorCode.EMPTY_QUERY_HAS_CONDITION, "empty select has condition", x);
}
boolean isSimpleConstExpr = false;
SQLExpr first = getFirst(where);