aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authordrh <>2022-04-10 19:51:22 +0000
committerdrh <>2022-04-10 19:51:22 +0000
commitfcde633f7cd4e8c3de41a4f3250f45cd38f49490 (patch)
treece58fdf0ac5a6214406e8b271c3277aa4e0ac61f /src/select.c
parente21e36dd2cf71d4164bc188774fab5e4d2976cb6 (diff)
downloadsqlite-fcde633f7cd4e8c3de41a4f3250f45cd38f49490.tar.gz
sqlite-fcde633f7cd4e8c3de41a4f3250f45cd38f49490.zip
When the left-most table of a RIGHT JOIN is implemented as a co-routine,
make sure all its columns are flushed to NULL when it finishes so that they appear to be NULL during the RIGHT JOIN post-processing. FossilOrigin-Name: f84b2beca719758979d7a5a63c3d16d5121a7518b3fbe5039af474a83dd569c2
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/select.c b/src/select.c
index b9321aece..3672a7c0f 100644
--- a/src/select.c
+++ b/src/select.c
@@ -6755,6 +6755,9 @@ int sqlite3Select(
pItem->pTab->nRowLogEst = pSub->nSelectRow;
pItem->fg.viaCoroutine = 1;
pItem->regResult = dest.iSdst;
+ if( pItem->fg.jointype & JT_LTORJ ){
+ sqlite3VdbeAddOp3(v, OP_Null, 0, dest.iSdst, dest.iSdst+dest.nSdst-1);
+ }
sqlite3VdbeEndCoroutine(v, pItem->regReturn);
sqlite3VdbeJumpHere(v, addrTop-1);
sqlite3ClearTempRegCache(pParse);