diff options
author | drh <drh@noemail.net> | 2019-12-04 19:45:52 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-12-04 19:45:52 +0000 |
commit | a634c9e653713cfed97f4409486470bc817f514f (patch) | |
tree | 30b25e5937af2c83b91b388c33e7dc99e4d60a79 /src/expr.c | |
parent | d63b69b8a2fe0afbc62ffb850b7f17d4862244fa (diff) | |
download | sqlite-a634c9e653713cfed97f4409486470bc817f514f.tar.gz sqlite-a634c9e653713cfed97f4409486470bc817f514f.zip |
Window functions are never constant.
FossilOrigin-Name: 35f0b5a8c7921f7419eeb11be8201fd6988047042fcaeffa297fc322bc480c1f
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index a3ed249ee..52b68b7c7 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1941,7 +1941,9 @@ static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){ ** and either pWalker->eCode==4 or 5 or the function has the ** SQLITE_FUNC_CONST flag. */ case TK_FUNCTION: - if( pWalker->eCode>=4 || ExprHasProperty(pExpr,EP_ConstFunc) ){ + if( (pWalker->eCode>=4 || ExprHasProperty(pExpr,EP_ConstFunc)) + && !ExprHasProperty(pExpr, EP_WinFunc) + ){ return WRC_Continue; }else{ pWalker->eCode = 0; |