1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Add the ability to factor constant functions out of inner loops. But do

not factor out non-constant functions, like random().

FossilOrigin-Name: 1b0f779e19a5c0d51eddd2d88db50034d77d132c
This commit is contained in:
drh
2013-11-21 14:33:48 +00:00
parent e09f43f8b7
commit b1fba2868b
6 changed files with 36 additions and 23 deletions

View File

@@ -725,6 +725,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
pExpr->op = TK_NULL;
return WRC_Prune;
}
if( pDef->funcFlags & SQLITE_FUNC_CONSTANT ) ExprSetProperty(pExpr,EP_Constant);
}
#endif
if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){