1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Ensure that there is a containing SELECT statement when processing a

normal aggregate function as if it were a window function.

FossilOrigin-Name: c1014e80b26131200a115beb86929a8f0ded2dd65b075e47373346c0f170576a
This commit is contained in:
drh
2019-12-13 11:42:56 +00:00
parent 0d98598507
commit 2e2c8819f1
3 changed files with 8 additions and 8 deletions

View File

@@ -967,7 +967,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
Select *pSel = pNC->pWinSelect;
assert( pWin==pExpr->y.pWin );
if( IN_RENAME_OBJECT==0 ){
sqlite3WindowUpdate(pParse, pSel->pWinDefn, pWin, pDef);
sqlite3WindowUpdate(pParse, pSel ? pSel->pWinDefn : 0, pWin, pDef);
}
sqlite3WalkExprList(pWalker, pWin->pPartition);
sqlite3WalkExprList(pWalker, pWin->pOrderBy);