1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Window functions are never constant.

FossilOrigin-Name: 35f0b5a8c7921f7419eeb11be8201fd6988047042fcaeffa297fc322bc480c1f
This commit is contained in:
drh
2019-12-04 19:45:52 +00:00
parent d63b69b8a2
commit a634c9e653
3 changed files with 10 additions and 8 deletions

View File

@@ -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;