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

When flattening a query, make sure iTable attribute of TK_IF_NULL_ROW

operators (that result from a prior flattening of a LEFT JOIN) are updated
correctly.  Fix for ticket [cad1ab4cb7b0fc344].

FossilOrigin-Name: 919d36e6ea112c8c94f01e02611c48e78c441657e6898a466cfc39f1e0001403
This commit is contained in:
drh
2017-05-23 01:29:35 +00:00
parent 2435fa6916
commit 10d33c1781
5 changed files with 29 additions and 14 deletions

View File

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