mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Indexes on expressions with a COLLATE clause are able to satisfy an ORDER BY
with the same COLLATE clause. FossilOrigin-Name: 0413001843dce7c63659d39b329ca14cdcd54f4407922f51b2fb7659572a733e
This commit is contained in:
@@ -2669,7 +2669,7 @@ static int indexMightHelpWithOrderBy(
|
||||
}else if( (aColExpr = pIndex->aColExpr)!=0 ){
|
||||
for(jj=0; jj<pIndex->nKeyCol; jj++){
|
||||
if( pIndex->aiColumn[jj]!=XN_EXPR ) continue;
|
||||
if( sqlite3ExprCompare(0, pExpr,aColExpr->a[jj].pExpr,iCursor)==0 ){
|
||||
if( sqlite3ExprCompareSkip(pExpr,aColExpr->a[jj].pExpr,iCursor)==0 ){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -3690,8 +3690,8 @@ static i8 wherePathSatisfiesOrderBy(
|
||||
if( pOBExpr->iTable!=iCur ) continue;
|
||||
if( pOBExpr->iColumn!=iColumn ) continue;
|
||||
}else{
|
||||
if( sqlite3ExprCompare(0,
|
||||
pOBExpr,pIndex->aColExpr->a[j].pExpr,iCur) ){
|
||||
Expr *pIdxExpr = pIndex->aColExpr->a[j].pExpr;
|
||||
if( sqlite3ExprCompareSkip(pOBExpr, pIdxExpr, iCur) ){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user