diff options
author | drh <drh@noemail.net> | 2013-11-21 14:33:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-11-21 14:33:48 +0000 |
commit | b1fba2868b7e1c1932fe7985658ca409e8bbd6da (patch) | |
tree | 29990af239aec83f676ef1142896e7a0b3b17dab /src/func.c | |
parent | e09f43f8b78369852773661c52df015b21ef3932 (diff) | |
download | sqlite-b1fba2868b7e1c1932fe7985658ca409e8bbd6da.tar.gz sqlite-b1fba2868b7e1c1932fe7985658ca409e8bbd6da.zip |
Add the ability to factor constant functions out of inner loops. But do
not factor out non-constant functions, like random().
FossilOrigin-Name: 1b0f779e19a5c0d51eddd2d88db50034d77d132c
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/func.c b/src/func.c index c9962f6d9..46c606ac0 100644 --- a/src/func.c +++ b/src/func.c @@ -1664,8 +1664,8 @@ void sqlite3RegisterGlobalFunctions(void){ FUNCTION2(ifnull, 2, 0, 0, noopFunc, SQLITE_FUNC_COALESCE), FUNCTION2(unlikely, 1, 0, 0, noopFunc, SQLITE_FUNC_UNLIKELY), FUNCTION2(likelihood, 2, 0, 0, noopFunc, SQLITE_FUNC_UNLIKELY), - FUNCTION(random, 0, 0, 0, randomFunc ), - FUNCTION(randomblob, 1, 0, 0, randomBlob ), + VFUNCTION(random, 0, 0, 0, randomFunc ), + VFUNCTION(randomblob, 1, 0, 0, randomBlob ), FUNCTION(nullif, 2, 0, 1, nullifFunc ), FUNCTION(sqlite_version, 0, 0, 0, versionFunc ), FUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ), @@ -1675,9 +1675,9 @@ void sqlite3RegisterGlobalFunctions(void){ FUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc ), #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ FUNCTION(quote, 1, 0, 0, quoteFunc ), - FUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid), - FUNCTION(changes, 0, 0, 0, changes ), - FUNCTION(total_changes, 0, 0, 0, total_changes ), + VFUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid), + VFUNCTION(changes, 0, 0, 0, changes ), + VFUNCTION(total_changes, 0, 0, 0, total_changes ), FUNCTION(replace, 3, 0, 0, replaceFunc ), FUNCTION(zeroblob, 1, 0, 0, zeroblobFunc ), #ifdef SQLITE_SOUNDEX |