aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2020-09-29 01:48:46 +0000
committerdrh <drh@noemail.net>2020-09-29 01:48:46 +0000
commitf761d937c233ab7e1ac1a187a80c45846a8d1c52 (patch)
tree8cd8c1de4a250556a0d2a75ab0c43149702ed4f4 /src/wherecode.c
parent68cf0ace3d160c8b3c12ee692c337f0d47e079d7 (diff)
downloadsqlite-f761d937c233ab7e1ac1a187a80c45846a8d1c52.tar.gz
sqlite-f761d937c233ab7e1ac1a187a80c45846a8d1c52.zip
The OP_SeekScan opcode works, but using it requires disabling the
IN-earlyout optimization because the OP_IfNoHope opcode might move the cursor. FossilOrigin-Name: f3c36b840c9a29c0add28039db216f4207a308e5057fc76e3f0004024a8267ac
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 8227d0d7d..adf03e6c3 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 ){
+ if( iEq>0 && (pLoop->wsFlags && WHERE_IN_SEEKSCAN)==0 ){
pLoop->wsFlags |= WHERE_IN_EARLYOUT;
}
@@ -1911,7 +1911,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
testcase( op==OP_IdxLE ); VdbeCoverageIf(v, op==OP_IdxLE );
}
- if( pLoop->wsFlags & WHERE_IN_EARLYOUT ){
+ if( (pLoop->wsFlags & WHERE_IN_EARLYOUT)!=0 ){
sqlite3VdbeAddOp3(v, OP_SeekHit, iIdxCur, nEq, nEq);
}