From 6c68d7592faa8cc59d5f81f3ba4d506ea4db71ca Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 4 Nov 2019 02:05:52 +0000 Subject: 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 --- src/expr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/expr.c') 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 ); -- cgit v1.2.3