aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-08-17 09:49:53 +0000
committerstephan <stephan@noemail.net>2023-08-17 09:49:53 +0000
commit95484726f607b332a46fa25fe8c46103141becb6 (patch)
treea666225ea2ceb24bd465aba3319596df4c4f754d /src
parent936f7deee40e7422058203de682f9f75af0359a6 (diff)
downloadsqlite-95484726f607b332a46fa25fe8c46103141becb6.tar.gz
sqlite-95484726f607b332a46fa25fe8c46103141becb6.zip
Add SQLITE_EXTRA_AUTOEXT, similar to SQLITE_EXTRA_INIT but adds a builtin auto-extension provided by the client. Suggestion from [forum:00829394c74a670f| forum post 00829394c74a670f].
FossilOrigin-Name: 423e77277a61d7febf4c3fc737981fa22a82b5c774a8ada5375a01a0611535b2
Diffstat (limited to 'src')
-rw-r--r--src/ctime.c3
-rw-r--r--src/main.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ctime.c b/src/ctime.c
index 368724168..03c89ff72 100644
--- a/src/ctime.c
+++ b/src/ctime.c
@@ -355,6 +355,9 @@ static const char * const sqlite3azCompileOpt[] = {
#ifdef SQLITE_EXPLAIN_ESTIMATED_ROWS
"EXPLAIN_ESTIMATED_ROWS",
#endif
+#ifdef SQLITE_EXTRA_AUTOEXT
+ "EXTRA_AUTOEXT=" CTIMEOPT_VAL(SQLITE_EXTRA_AUTOEXT),
+#endif
#ifdef SQLITE_EXTRA_IFNULLROW
"EXTRA_IFNULLROW",
#endif
diff --git a/src/main.c b/src/main.c
index cd0200890..b8f262261 100644
--- a/src/main.c
+++ b/src/main.c
@@ -47,7 +47,9 @@ int sqlite3Fts5Init(sqlite3*);
#ifdef SQLITE_ENABLE_STMTVTAB
int sqlite3StmtVtabInit(sqlite3*);
#endif
-
+#ifdef SQLITE_EXTRA_AUTOEXT
+int SQLITE_EXTRA_AUTOEXT(sqlite3*);
+#endif
/*
** An array of pointers to extension initializer functions for
** built-in extensions.
@@ -81,6 +83,9 @@ static int (*const sqlite3BuiltinExtensions[])(sqlite3*) = {
#ifdef SQLITE_ENABLE_BYTECODE_VTAB
sqlite3VdbeBytecodeVtabInit,
#endif
+#ifdef SQLITE_EXTRA_AUTOEXT
+ SQLITE_EXTRA_AUTOEXT,
+#endif
};
#ifndef SQLITE_AMALGAMATION