aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2022-04-12 13:46:21 +0000
committerdrh <>2022-04-12 13:46:21 +0000
commita70782407d12bae34240167814b49e1593048aca (patch)
treeb0f819f170a1837910d99659e40e6b8570c49a69 /src
parentb087de063bed22932287aff4f12a2e5a3083aa8d (diff)
downloadsqlite-a70782407d12bae34240167814b49e1593048aca.tar.gz
sqlite-a70782407d12bae34240167814b49e1593048aca.zip
Always explicitly set each table cursor to NullRow before doing the RIGHT-JOIN
unmatched row pass. This is a cheap opcode, and it adds an extra layer of defense against incorrect results. FossilOrigin-Name: a3d14e61ca22167296fee125a3e9aa63413408955e03bb3f9d85fa9f22df1b79
Diffstat (limited to 'src')
-rw-r--r--src/where.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/where.c b/src/where.c
index f1d3ad265..288365331 100644
--- a/src/where.c
+++ b/src/where.c
@@ -6180,13 +6180,11 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
for(k=0; k<i; k++){
int iIdxCur;
mAll |= pWInfo->a[k].pWLoop->maskSelf;
+ sqlite3VdbeAddOp1(v, OP_NullRow, pWInfo->a[k].iTabCur);
iIdxCur = pWInfo->a[k].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++){