1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

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
This commit is contained in:
drh
2022-04-12 13:46:21 +00:00
parent b087de063b
commit a70782407d
3 changed files with 8 additions and 10 deletions

View File

@@ -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++){