1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Ensure that the expression rewriter inside the query flattener decends into

the substructure of the TK_IF_NULL_ROW operator.  This is a continuation
of the fix for ticket [cad1ab4cb7b0fc344].

FossilOrigin-Name: 28d2902d8f4dfbbfc610f271e00d353b0baae386b56b482f96b88836410be129
This commit is contained in:
drh
2017-05-23 12:44:57 +00:00
parent f352cf57e3
commit 7c1544e051
4 changed files with 17 additions and 10 deletions

View File

@@ -3213,9 +3213,10 @@ static Expr *substExpr(
pExpr = pNew;
}
}
}else if( pExpr->op==TK_IF_NULL_ROW && pExpr->iTable==pSubst->iTable ){
pExpr->iTable = pSubst->iNewTable;
}else{
if( pExpr->op==TK_IF_NULL_ROW && pExpr->iTable==pSubst->iTable ){
pExpr->iTable = pSubst->iNewTable;
}
pExpr->pLeft = substExpr(pSubst, pExpr->pLeft);
pExpr->pRight = substExpr(pSubst, pExpr->pRight);
if( ExprHasProperty(pExpr, EP_xIsSelect) ){