mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Fix a window-functions problem that could occur if an ORDER BY clause contains an alias for a window-function that is not a top-level expression.
FossilOrigin-Name: 1cc6cf6407c6e25aeafeca379a93d0ad2614839c07fb3644e46926fce5f1cfab
This commit is contained in:
@@ -96,6 +96,9 @@ static void resolveAlias(
|
||||
pExpr->u.zToken = sqlite3DbStrDup(db, pExpr->u.zToken);
|
||||
pExpr->flags |= EP_MemToken;
|
||||
}
|
||||
if( ExprHasProperty(pExpr, EP_WinFunc) ){
|
||||
pExpr->y.pWin->pOwner = pExpr;
|
||||
}
|
||||
sqlite3DbFree(db, pDup);
|
||||
}
|
||||
ExprSetProperty(pExpr, EP_Alias);
|
||||
|
Reference in New Issue
Block a user