mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Add a comment to explain why both sides of an AND must be non-null-row in order
for the overall expression to be non-null-row. No code changes. FossilOrigin-Name: 8396032ce14a75f408f0a75bcb36a6504d5188f20886e275746a2c336a74296f
This commit is contained in:
@@ -6030,6 +6030,13 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){
|
||||
|
||||
case TK_OR:
|
||||
case TK_AND:
|
||||
/* Both sides of an AND or OR must separately imply non-NULL row.
|
||||
** Consider these cases:
|
||||
** 1. NOT (x AND y)
|
||||
** 2. x OR y
|
||||
** If only one of x or y is non-null-row, then the overall expression
|
||||
** can be true if the other arm is false (case 1) or true (case 2).
|
||||
*/
|
||||
testcase( pExpr->op==TK_OR );
|
||||
testcase( pExpr->op==TK_AND );
|
||||
if( pWalker->eCode==0 ){
|
||||
|
Reference in New Issue
Block a user