diff options
author | drh <drh@noemail.net> | 2020-09-29 15:32:54 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2020-09-29 15:32:54 +0000 |
commit | 46f0f4e56d8d818f417fa8f14ab4837133003b5d (patch) | |
tree | 78ac6bd5c71170d74efc77e27ae7e7ab47448a16 /src/wherecode.c | |
parent | f761d937c233ab7e1ac1a187a80c45846a8d1c52 (diff) | |
download | sqlite-46f0f4e56d8d818f417fa8f14ab4837133003b5d.tar.gz sqlite-46f0f4e56d8d818f417fa8f14ab4837133003b5d.zip |
Typo fix to repair the early-out optimization. Also avoid unnecessary
OP_SeekHit opcodes.
FossilOrigin-Name: 8fd7d8dfcd515aa6b65d6eb27b033d3b3a31db467b9100cc13c62bc60113019e
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index adf03e6c3..4e10c79d8 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -570,7 +570,7 @@ static int codeEqualityTerm( if( pLevel->u.in.nIn==0 ){ pLevel->addrNxt = sqlite3VdbeMakeLabel(pParse); } - if( iEq>0 && (pLoop->wsFlags && WHERE_IN_SEEKSCAN)==0 ){ + if( iEq>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0 ){ pLoop->wsFlags |= WHERE_IN_EARLYOUT; } @@ -608,7 +608,7 @@ static int codeEqualityTerm( pIn++; } } - if( iEq>0 ){ + if( iEq>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0 ){ sqlite3VdbeAddOp3(v, OP_SeekHit, pLevel->iIdxCur, 0, iEq); } }else{ |