mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Reverse commit (6315) for now. (CVS 6317)
FossilOrigin-Name: 0e7c369c23a8767b4d3e5cdd47c14716992fb71a
This commit is contained in:
17
src/where.c
17
src/where.c
@@ -16,7 +16,7 @@
|
||||
** so is applicable. Because this module is responsible for selecting
|
||||
** indices, you might also think of this module as the "query optimizer".
|
||||
**
|
||||
** $Id: where.c,v 1.372 2009/02/23 17:33:50 danielk1977 Exp $
|
||||
** $Id: where.c,v 1.373 2009/02/24 10:14:40 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -2035,21 +2035,6 @@ static void bestIndex(
|
||||
}
|
||||
}
|
||||
|
||||
if( pCost->plan.wsFlags==0 && pSrc->colUsed==0 && pSrc->usesRowid==0 ){
|
||||
Index *pSmallest = 0;
|
||||
assert( pSrc->pIndex==0 );
|
||||
for(pProbe=pSrc->pTab->pIndex; pProbe; pProbe=pProbe->pNext){
|
||||
if( !pSmallest || pProbe->nColumn<pSmallest->nColumn ){
|
||||
pSmallest = pProbe;
|
||||
}
|
||||
}
|
||||
if( pSmallest && pSmallest->nColumn<pSrc->pTab->nCol ){
|
||||
assert( pCost->plan.nEq==0 );
|
||||
pCost->plan.u.pIdx = pSmallest;
|
||||
pCost->plan.wsFlags = WHERE_COLUMN_RANGE|WHERE_IDX_ONLY;
|
||||
}
|
||||
}
|
||||
|
||||
/* Report the best result
|
||||
*/
|
||||
pCost->plan.wsFlags |= eqTermMask;
|
||||
|
||||
Reference in New Issue
Block a user