aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-12-08 20:30:31 +0000
committerdrh <drh@noemail.net>2018-12-08 20:30:31 +0000
commitd4a4a36171fdc93a9fc117af2f957c86624b50da (patch)
tree183843a808f6a0c9f13a4e34ec07c3aadfceda5c /src/expr.c
parent83da91b7bd6a6253080fa3b821e4adc9002a3541 (diff)
downloadsqlite-d4a4a36171fdc93a9fc117af2f957c86624b50da.tar.gz
sqlite-d4a4a36171fdc93a9fc117af2f957c86624b50da.zip
Do not use a partial index as a table scan in an IN operator.
Fix for ticket [1d958d90596593a77420e59]. FossilOrigin-Name: 15bc915dd7ae25bfdfbe357c3792db3639799e4d121c6b5b24297af2d6d7129e
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c
index 6886d30b2..0b2e79775 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -2443,6 +2443,7 @@ int sqlite3FindInIndex(
Bitmask colUsed; /* Columns of the index used */
Bitmask mCol; /* Mask for the current column */
if( pIdx->nColumn<nExpr ) continue;
+ if( pIdx->pPartIdxWhere!=0 ) continue;
/* Maximum nColumn is BMS-2, not BMS-1, so that we can compute
** BITMASK(nExpr) without overflowing */
testcase( pIdx->nColumn==BMS-2 );