mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
sqlwall add partAlwayFalse rule
This commit is contained in:
@@ -854,6 +854,12 @@ public class SQLEvalVisitorUtils {
|
||||
wallConditionContext.setPartAlwayTrue(true);
|
||||
}
|
||||
}
|
||||
} else if (x.getOperator() == SQLBinaryOperator.BooleanAnd) {
|
||||
if (wallConditionContext != null) {
|
||||
if (left.getAttribute(EVAL_VALUE) == Boolean.FALSE || right.getAttribute(EVAL_VALUE) == Boolean.FALSE) {
|
||||
wallConditionContext.setPartAlwayFalse(true);
|
||||
}
|
||||
}
|
||||
} else if (x.getOperator() == SQLBinaryOperator.BooleanXor) {
|
||||
if (wallConditionContext != null) {
|
||||
wallConditionContext.setXor(true);
|
||||
|
||||
Reference in New Issue
Block a user