mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-09 10:21:35 +03:00
Rename SQLITE_FUNC_VARYING to SQLITE_FUNC_SLOCHNG - a more descriptive name
for what that bit means. FossilOrigin-Name: ff5137a6dd8cb2a9b629b3a244f52665e9c9ebce
This commit is contained in:
@@ -729,15 +729,16 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
return WRC_Prune;
|
||||
}
|
||||
#endif
|
||||
if( pDef->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_VARYING) ){
|
||||
if( pDef->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG) ){
|
||||
/* For the purposes of the EP_ConstFunc flag, date and time
|
||||
** functions and other functions that change slowly are considered
|
||||
** constant because they are constant for the duration of one query */
|
||||
ExprSetProperty(pExpr,EP_ConstFunc);
|
||||
}
|
||||
if( (pDef->funcFlags & SQLITE_FUNC_CONSTANT)==0 ){
|
||||
/* DATETIME functions are considered non-deterministic because of
|
||||
** the 'now' capability */
|
||||
/* Date/time functions that use 'now', and other functions like
|
||||
** sqlite_version() that might change over time cannot be used
|
||||
** in an index. */
|
||||
notValid(pParse, pNC, "non-deterministic functions", NC_IdxExpr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user