aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-06-07 16:07:00 +0000
committerdrh <drh@noemail.net>2018-06-07 16:07:00 +0000
commit056f5396fef186c23f654b06872c9f478d530016 (patch)
tree5567892af1074da4e07e3dcdf11e9ede703e9577 /src/wherecode.c
parent64c1f77a8e066e0bdbd640cfd97c87a5094cefb9 (diff)
downloadsqlite-056f5396fef186c23f654b06872c9f478d530016.tar.gz
sqlite-056f5396fef186c23f654b06872c9f478d530016.zip
Test cases.
FossilOrigin-Name: 085e863713a3f2d420c0076b275a6ac445a59d4d93f9eb0e8503b4e3f5589249
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 03c3b78ae..32378381e 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -592,7 +592,7 @@ static int codeEqualityTerm(
if( i==iEq ){
pIn->iCur = iTab;
pIn->eEndLoopOp = bRev ? OP_PrevIfOpen : OP_NextIfOpen;
- if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 ){
+ if( iEq>0 && (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 ){
pIn->iBase = iReg - i;
pIn->nPrefix = i;
pLoop->wsFlags |= WHERE_IN_EARLYOUT;