diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 78efbf979..eda8d5fb8 100644 --- a/src/where.c +++ b/src/where.c @@ -3103,7 +3103,9 @@ static void bestBtreeIndex( /* If there is a DISTINCT qualifier and this index will scan rows in ** order of the DISTINCT expressions, clear bDist and set the appropriate ** flags in wsFlags. */ - if( isDistinctIndex(pParse, pWC, pProbe, iCur, pDistinct, nEq) ){ + if( isDistinctIndex(pParse, pWC, pProbe, iCur, pDistinct, nEq) + && (wsFlags & WHERE_COLUMN_IN)==0 + ){ bDist = 0; wsFlags |= WHERE_ROWID_RANGE|WHERE_COLUMN_RANGE|WHERE_DISTINCT; } |