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

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
This commit is contained in:
drh
2022-04-10 19:51:22 +00:00
parent e21e36dd2c
commit fcde633f7c
4 changed files with 37 additions and 27 deletions

View File

@@ -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);