mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Fix a problem computing affinities for indexes during skip-scan code
generation when SQLITE_ENABLE_STAT4 is on. Bug introduced by check-in [1ee089a72d789002]. FossilOrigin-Name: 1350dd42d056508337b1a07ad8b1c9c97593f8d3
This commit is contained in:
@@ -1159,6 +1159,7 @@ static LogEst whereRangeAdjust(WhereTerm *pTerm, LogEst nNew){
|
||||
** Return the affinity for a single column of an index.
|
||||
*/
|
||||
static char sqlite3IndexColumnAffinity(sqlite3 *db, Index *pIdx, int iCol){
|
||||
assert( iCol>=0 && iCol<pIdx->nColumn );
|
||||
if( !pIdx->zColAff ){
|
||||
if( sqlite3IndexAffinityStr(db, pIdx)==0 ) return SQLITE_AFF_BLOB;
|
||||
}
|
||||
@@ -1216,8 +1217,7 @@ static int whereRangeSkipScanEst(
|
||||
int nLower = -1;
|
||||
int nUpper = p->nSample+1;
|
||||
int rc = SQLITE_OK;
|
||||
int iCol = p->aiColumn[nEq];
|
||||
u8 aff = sqlite3IndexColumnAffinity(db, p, iCol);
|
||||
u8 aff = sqlite3IndexColumnAffinity(db, p, nEq);
|
||||
CollSeq *pColl;
|
||||
|
||||
sqlite3_value *p1 = 0; /* Value extracted from pLower */
|
||||
|
||||
Reference in New Issue
Block a user