mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix a problem causing queries containing window functions to ignore collation sequences under some circumstances.
FossilOrigin-Name: e6c2192ef88e9990c8b91755c8e779f09e23f936a17123d8e42059257b756ed7
This commit is contained in:
@@ -803,6 +803,7 @@ static int selectWindowRewriteExprCb(Walker *pWalker, Expr *pExpr){
|
||||
p->pSub = sqlite3ExprListAppend(pParse, p->pSub, pDup);
|
||||
}
|
||||
if( p->pSub ){
|
||||
int f = pExpr->flags & EP_Collate;
|
||||
assert( ExprHasProperty(pExpr, EP_Static)==0 );
|
||||
ExprSetProperty(pExpr, EP_Static);
|
||||
sqlite3ExprDelete(pParse->db, pExpr);
|
||||
@@ -813,6 +814,7 @@ static int selectWindowRewriteExprCb(Walker *pWalker, Expr *pExpr){
|
||||
pExpr->iColumn = (iCol<0 ? p->pSub->nExpr-1: iCol);
|
||||
pExpr->iTable = p->pWin->iEphCsr;
|
||||
pExpr->y.pTab = p->pTab;
|
||||
pExpr->flags = f;
|
||||
}
|
||||
if( pParse->db->mallocFailed ) return WRC_Abort;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user