aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2022-04-11 21:00:38 +0000
committerdrh <>2022-04-11 21:00:38 +0000
commitb087de063bed22932287aff4f12a2e5a3083aa8d (patch)
treead7abb1c7c0f391990eda6314a95e75cd63fd546 /src
parentc133bab72a60fc020fffce0a329c1a4092f20aa0 (diff)
downloadsqlite-b087de063bed22932287aff4f12a2e5a3083aa8d.tar.gz
sqlite-b087de063bed22932287aff4f12a2e5a3083aa8d.zip
Fix RIGHT JOIN for virtual tables.
FossilOrigin-Name: 75a9116e98b9ac5c1a4c62a01143a016d9ba6a0b495ff7af7468c11947a3e888
Diffstat (limited to 'src')
-rw-r--r--src/where.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c
index defbc860f..f1d3ad265 100644
--- a/src/where.c
+++ b/src/where.c
@@ -6181,7 +6181,12 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
int iIdxCur;
mAll |= pWInfo->a[k].pWLoop->maskSelf;
iIdxCur = pWInfo->a[k].iIdxCur;
- if( iIdxCur ) sqlite3VdbeAddOp1(v, OP_NullRow, iIdxCur);
+ if( iIdxCur ){
+ sqlite3VdbeAddOp1(v, OP_NullRow, iIdxCur);
+ }
+ if( pWInfo->a[k].pWLoop->wsFlags & WHERE_VIRTUALTABLE ){
+ sqlite3VdbeAddOp1(v, OP_NullRow, pWInfo->a[k].iTabCur);
+ }
}
mAll |= pLoop->maskSelf;
for(k=0; k<pWC->nTerm; k++){