aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-11-04 02:05:52 +0000
committerdrh <drh@noemail.net>2019-11-04 02:05:52 +0000
commit6c68d7592faa8cc59d5f81f3ba4d506ea4db71ca (patch)
treebf8ea41a7e2ccbec5a36dbf1f9349d28135277ec /src/expr.c
parentdb535390dbe2506858a781e8250e3e51a3270f10 (diff)
downloadsqlite-6c68d7592faa8cc59d5f81f3ba4d506ea4db71ca.tar.gz
sqlite-6c68d7592faa8cc59d5f81f3ba4d506ea4db71ca.zip
Fix a false-postive in the sqlite3ExprImpliesNonNullRow() decision routine,
that resulted in an incorrect LEFT JOIN strength reduction when the WHERE clause contained a row-value comparison. Ticket [02aa2bd02f97d0f2] FossilOrigin-Name: ea20068e6d97c9349ebcc7d0a01e99ebf08c6f44363f71a0218a1abea209adc5
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index a4407f4a8..093736f39 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -5212,7 +5212,7 @@ int sqlite3ExprImpliesExpr(Parse *pParse, Expr *pE1, Expr *pE2, int iTab){
}
/*
-** This is the Expr node callback for sqlite3ExprImpliesNotNullRow().
+** This is the Expr node callback for sqlite3ExprImpliesNonNullRow().
** If the expression node requires that the table at pWalker->iCur
** have one or more non-NULL column, then set pWalker->eCode to 1 and abort.
**
@@ -5230,6 +5230,7 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){
case TK_NOTNULL:
case TK_IS:
case TK_OR:
+ case TK_VECTOR:
case TK_CASE:
case TK_IN:
case TK_FUNCTION:
@@ -5239,6 +5240,7 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){
testcase( pExpr->op==TK_NOTNULL );
testcase( pExpr->op==TK_IS );
testcase( pExpr->op==TK_OR );
+ testcase( pExpr->op==TK_VECTOR );
testcase( pExpr->op==TK_CASE );
testcase( pExpr->op==TK_IN );
testcase( pExpr->op==TK_FUNCTION );