diff options
author | drh <> | 2025-05-30 22:58:09 +0000 |
---|---|---|
committer | drh <> | 2025-05-30 22:58:09 +0000 |
commit | d930d7ef14b2449bd9d8c18ed6aaf8a27a9f16d9 (patch) | |
tree | 98e66d9504c0090a0d932327db3cfd303cb71e7b /src/select.c | |
parent | dd16539e71e375abbe2affa3b142f2454a3d9edc (diff) | |
download | sqlite-d930d7ef14b2449bd9d8c18ed6aaf8a27a9f16d9.tar.gz sqlite-d930d7ef14b2449bd9d8c18ed6aaf8a27a9f16d9.zip |
Follow-up to the previous: The same optimization suppression needs to
happen if the left-hand side is coming from a LEFT JOIN.
FossilOrigin-Name: cf5b37b3a39013d8ca9de92da2289346caf52b56daff59e19b140cc586a3421f
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/select.c b/src/select.c index da0aa63e4..81cb1184e 100644 --- a/src/select.c +++ b/src/select.c @@ -631,6 +631,9 @@ static int sqlite3ProcessJoin(Parse *pParse, Select *p){ pFuncArgs = sqlite3ExprListAppend(pParse, pFuncArgs, pE1); pE1 = sqlite3ExprFunction(pParse, pFuncArgs, &tkCoalesce, 0); } + }else if( (pSrc->a[i+1].fg.jointype & JT_LEFT)!=0 && pParse->nErr==0 ){ + assert( pE1!=0 ); + ExprSetProperty(pE1, EP_CanBeNull); } pE2 = sqlite3CreateColumnExpr(db, pSrc, i+1, iRightCol); sqlite3SrcItemColumnUsed(pRight, iRightCol); |