mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-07 20:22:20 +03:00
Small performance enhancement for whereScanInit().
FossilOrigin-Name: ed84e124c6097b756ca687ac64df7ee801d14b16c835f1a9e8b336f785157d85
This commit is contained in:
12
src/where.c
12
src/where.c
@@ -419,16 +419,16 @@ static WhereTerm *whereScanInit(
|
||||
if( pIdx ){
|
||||
int j = iColumn;
|
||||
iColumn = pIdx->aiColumn[j];
|
||||
if( iColumn==XN_EXPR ){
|
||||
pScan->pIdxExpr = pIdx->aColExpr->a[j].pExpr;
|
||||
pScan->zCollName = pIdx->azColl[j];
|
||||
pScan->aiColumn[0] = XN_EXPR;
|
||||
return whereScanInitIndexExpr(pScan);
|
||||
}else if( iColumn==pIdx->pTable->iPKey ){
|
||||
if( iColumn==pIdx->pTable->iPKey ){
|
||||
iColumn = XN_ROWID;
|
||||
}else if( iColumn>=0 ){
|
||||
pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;
|
||||
pScan->zCollName = pIdx->azColl[j];
|
||||
}else if( iColumn==XN_EXPR ){
|
||||
pScan->pIdxExpr = pIdx->aColExpr->a[j].pExpr;
|
||||
pScan->zCollName = pIdx->azColl[j];
|
||||
pScan->aiColumn[0] = XN_EXPR;
|
||||
return whereScanInitIndexExpr(pScan);
|
||||
}
|
||||
}else if( iColumn==XN_EXPR ){
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user