aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <>2023-11-07 19:03:13 +0000
committerdrh <>2023-11-07 19:03:13 +0000
commit17a32953873c52b91a18f79f371bd15887a022ed (patch)
tree68fba5e521280fdab2b3b07954997118fd0157a7 /src/sqliteInt.h
parent637922acac23fe995fd2772559eaf5b75d057c9b (diff)
downloadsqlite-17a32953873c52b91a18f79f371bd15887a022ed.tar.gz
sqlite-17a32953873c52b91a18f79f371bd15887a022ed.zip
Update the documentation to the sqlite3_set_auxdata() and sqlite3_get_auxdata()
routines to make it clear that they do not work as one might expect when they are called during query planning, instead of during query execution. The JSON routines misuse those interfaces, so add a special flag to JSON routines that prevents them from being invoked during query planning. Fix for the problem in [forum:/forumpost/a655ee159eca1ea5|forum post a655ee159eca1ea5]. FossilOrigin-Name: 796a23f9ee33da0803844a2f40c1733db894cc4ef7fbaa1fa94af6af2d3b873b
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 23beb48de..1a2250053 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -2014,7 +2014,7 @@ struct FuncDestructor {
#define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
** single query - might change over time */
#define SQLITE_FUNC_TEST 0x4000 /* Built-in testing functions */
-/* 0x8000 -- available for reuse */
+#define SQLITE_FUNC_RUNONLY 0x8000 /* Cannot be used by valueFromFunction */
#define SQLITE_FUNC_WINDOW 0x00010000 /* Built-in window-only function */
#define SQLITE_FUNC_INTERNAL 0x00040000 /* For use by NestedParse() only */
#define SQLITE_FUNC_DIRECT 0x00080000 /* Not for use in TRIGGERs or VIEWs */
@@ -2115,7 +2115,7 @@ struct FuncDestructor {
xPtr, 0, xFunc, 0, 0, 0, #zName, {0} }
#define JFUNCTION(zName, nArg, iArg, xFunc) \
{nArg, SQLITE_FUNC_BUILTIN|SQLITE_DETERMINISTIC|\
- SQLITE_FUNC_CONSTANT|SQLITE_UTF8, \
+ SQLITE_FUNC_CONSTANT|SQLITE_UTF8|SQLITE_FUNC_RUNONLY, \
SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, 0, #zName, {0} }
#define INLINE_FUNC(zName, nArg, iArg, mFlags) \
{nArg, SQLITE_FUNC_BUILTIN|\