aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2016-03-05 21:32:14 +0000
committerdan <dan@noemail.net>2016-03-05 21:32:14 +0000
commit104ead923e40fd2844631ef9c4962b9abb5d7b08 (patch)
tree34e815049e6797cce7b1dfffdb276d97b0448463 /src
parent6a1e0769397d4206e70cda9289ae43140ab06c5b (diff)
downloadsqlite-104ead923e40fd2844631ef9c4962b9abb5d7b08.tar.gz
sqlite-104ead923e40fd2844631ef9c4962b9abb5d7b08.zip
Fix a problem in the previous commit affecting queries with three or more tables joined together to the right of a LEFT or CROSS JOIN operator.
FossilOrigin-Name: d8d89d69a490a708b83147945f74134ae0e4b387
Diffstat (limited to 'src')
-rw-r--r--src/where.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c
index 07936c591..ea62617c5 100644
--- a/src/where.c
+++ b/src/where.c
@@ -2994,7 +2994,7 @@ static int whereLoopAddVirtual(
mPrev = mNext;
if( mNext==(Bitmask)(-1) ) break;
if( mNext==mBest || mNext==mBestNoIn ) continue;
- rc = whereLoopAddVirtualOne(pBuilder, mExtra, mNext, 0, p, &bIn);
+ rc = whereLoopAddVirtualOne(pBuilder, mExtra, mNext|mExtra, 0, p, &bIn);
if( pNew->prereq==mExtra ){
seenZero = 1;
if( bIn==0 ) seenZeroNoIN = 1;