aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/expr.c b/src/expr.c
index e00b319ed..8f02ae569 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1325,12 +1325,7 @@ static int gatherSelectWindowsCallback(Walker *pWalker, Expr *pExpr){
assert( pWin );
assert( IsWindowFunc(pExpr) );
assert( pWin->ppThis==0 );
- if( pSelect->pWin ){
- pSelect->pWin->ppThis = &pWin->pNextWin;
- }
- pWin->pNextWin = pSelect->pWin;
- pWin->ppThis = &pSelect->pWin;
- pSelect->pWin = pWin;
+ sqlite3WindowLink(pSelect, pWin);
}
return WRC_Continue;
}