mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Fix a problem involving window function aliases being referenced from sub-selects.
FossilOrigin-Name: e3b5fc05c00fc58be7a7c94ce1d97a5b05113f39aba03df64aab08364f85616b
This commit is contained in:
@@ -459,7 +459,9 @@ static int lookupName(
|
||||
sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs);
|
||||
return WRC_Abort;
|
||||
}
|
||||
if( (pNC->ncFlags&NC_AllowWin)==0 && ExprHasProperty(pOrig, EP_Win) ){
|
||||
if( ExprHasProperty(pOrig, EP_Win)
|
||||
&& ((pNC->ncFlags&NC_AllowWin)==0 || pNC!=pTopNC )
|
||||
){
|
||||
sqlite3ErrorMsg(pParse, "misuse of aliased window function %s",zAs);
|
||||
return WRC_Abort;
|
||||
}
|
||||
|
Reference in New Issue
Block a user