diff options
author | drh <drh@noemail.net> | 2019-12-31 18:39:23 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-12-31 18:39:23 +0000 |
commit | 64de2a5f7b77ebad6adda5914976ef4ed09c313a (patch) | |
tree | 37ee79ca6634e8213baebc211d5d9cf4364bf83d /src | |
parent | 1e732787dadf6a950efd25e66374825d15ed758e (diff) | |
download | sqlite-64de2a5f7b77ebad6adda5914976ef4ed09c313a.tar.gz sqlite-64de2a5f7b77ebad6adda5914976ef4ed09c313a.zip |
Also set the SQLITE_DIRECTONLY flag on the load_extension() function.
FossilOrigin-Name: 3bd095a53119c368fe30e539983588b27957203344cf427405b9a64784b8eba7
Diffstat (limited to 'src')
-rw-r--r-- | src/func.c | 4 | ||||
-rw-r--r-- | src/sqliteInt.h | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/func.c b/src/func.c index 3201b6df8..d4c6936b1 100644 --- a/src/func.c +++ b/src/func.c @@ -1911,8 +1911,8 @@ void sqlite3RegisterBuiltinFunctions(void){ FUNCTION(soundex, 1, 0, 0, soundexFunc ), #endif #ifndef SQLITE_OMIT_LOAD_EXTENSION - VFUNCTION(load_extension, 1, 0, 0, loadExt ), - VFUNCTION(load_extension, 2, 0, 0, loadExt ), + SFUNCTION(load_extension, 1, 0, 0, loadExt ), + SFUNCTION(load_extension, 2, 0, 0, loadExt ), #endif #if SQLITE_USER_AUTHENTICATION FUNCTION(sqlite_crypt, 2, 0, 0, sqlite3CryptFunc ), diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 84f8e1e5c..0dcb10353 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1733,6 +1733,10 @@ struct FuncDestructor { ** VFUNCTION(zName, nArg, iArg, bNC, xFunc) ** Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag. ** +** SFUNCTION(zName, nArg, iArg, bNC, xFunc) +** Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag and +** adds the SQLITE_DIRECTONLY flag. +** ** DFUNCTION(zName, nArg, iArg, bNC, xFunc) ** Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag and ** adds the SQLITE_FUNC_SLOCHNG flag. Used for date & time functions @@ -1772,6 +1776,9 @@ struct FuncDestructor { #define VFUNCTION(zName, nArg, iArg, bNC, xFunc) \ {nArg, SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \ SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, 0, #zName, {0} } +#define SFUNCTION(zName, nArg, iArg, bNC, xFunc) \ + {nArg, SQLITE_UTF8|SQLITE_DIRECTONLY, \ + SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, 0, #zName, {0} } #define DFUNCTION(zName, nArg, iArg, bNC, xFunc) \ {nArg, SQLITE_FUNC_SLOCHNG|SQLITE_UTF8, \ 0, 0, xFunc, 0, 0, 0, #zName, {0} } |