aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-03-01 20:23:46 +0000
committerdrh <>2023-03-01 20:23:46 +0000
commitbf901148678bef77f5910c7046053021b611b40b (patch)
tree1d1c1d53c29c54d976c378c087c9b478e3878020 /src
parentfe373482552e7b254cf6d3f94ca734014a58250b (diff)
downloadsqlite-bf901148678bef77f5910c7046053021b611b40b.tar.gz
sqlite-bf901148678bef77f5910c7046053021b611b40b.zip
When flattening a view that is the right operand of a LEFT JOIN, using
the optimization of check-in [41c27bc0ff1d3135], always insert the TK_IF_NULL_ROW expression nodes, even for TK_COLUMN expressions, as the TK_COLUMN might be a column from an outer query and hence still need to be NULLed out. This fixes the problem described by [forum:/forumpost/26387ea7ef|forum post 26387ea7ef]. FossilOrigin-Name: 198b3e33dcfd74c7ba6abcf789ee81dfed464a50ebf15c8edeff349d36789fca
Diffstat (limited to 'src')
-rw-r--r--src/select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c
index 82d195de3..359dc8cf3 100644
--- a/src/select.c
+++ b/src/select.c
@@ -3861,7 +3861,7 @@ static Expr *substExpr(
sqlite3VectorErrorMsg(pSubst->pParse, pCopy);
}else{
sqlite3 *db = pSubst->pParse->db;
- if( pSubst->isOuterJoin && pCopy->op!=TK_COLUMN ){
+ if( pSubst->isOuterJoin ){
memset(&ifNullRow, 0, sizeof(ifNullRow));
ifNullRow.op = TK_IF_NULL_ROW;
ifNullRow.pLeft = pCopy;