aboutsummaryrefslogtreecommitdiff
path: root/src/resolve.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2020-05-24 03:38:37 +0000
committerdrh <drh@noemail.net>2020-05-24 03:38:37 +0000
commitc37577bb2dfb602a5cdbba8322a01b548c34c185 (patch)
treeee5a8208071a407b9491f04e8c84a093b14ce2b6 /src/resolve.c
parente40cc16b472071f553700c7208394e6cf73d5688 (diff)
downloadsqlite-c37577bb2dfb602a5cdbba8322a01b548c34c185.tar.gz
sqlite-c37577bb2dfb602a5cdbba8322a01b548c34c185.zip
When rewriting a query for window functions, if the rewrite changes the
depth of TK_AGG_FUNCTION nodes, be sure to adjust the Expr.op2 field appropriately. Fix for ticket [7a5279a25c57adf1] FossilOrigin-Name: ad7bb70af9bb68d192137188bb2528f1e9e43ad164c925174ca1dafc9e1f5339
Diffstat (limited to 'src/resolve.c')
-rw-r--r--src/resolve.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/resolve.c b/src/resolve.c
index 60fed0b10..aff6dbead 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -24,6 +24,8 @@
**
** incrAggFunctionDepth(pExpr,n) is the main routine. incrAggDepth(..)
** is a helper function - a callback for the tree walker.
+**
+** See also the sqlite3WindowExtraAggFuncDepth() routine in window.c
*/
static int incrAggDepth(Walker *pWalker, Expr *pExpr){
if( pExpr->op==TK_AGG_FUNCTION ) pExpr->op2 += pWalker->u.n;