diff --git a/autoconf/Makefile.in b/autoconf/Makefile.in
index a77386faed..528d9405ee 100644
--- a/autoconf/Makefile.in
+++ b/autoconf/Makefile.in
@@ -222,9 +222,12 @@ install: install-lib
# Flags to link the shell app either directly against sqlite3.c
# (ENABLE_STATIC_SHELL==1) or libsqlite3.so (ENABLE_STATIC_SHELL==0).
#
+# Maintenance reminder: placement of $(LDFLAGS) is more relevant for
+# some platforms than others:
+# https://sqlite.org/forum/forumpost/d80ecdaddd
ENABLE_STATIC_SHELL = @ENABLE_STATIC_SHELL@
-sqlite3-shell-link-flags.1 = $(TOP)/sqlite3.c $(LDFLAGS.libsqlite3)
-sqlite3-shell-link-flags.0 = -L. -lsqlite3 $(LDFLAGS.zlib) $(LDFLAGS.math)
+sqlite3-shell-link-flags.1 = $(TOP)/sqlite3.c $(LDFLAGS) $(LDFLAGS.libsqlite3)
+sqlite3-shell-link-flags.0 = $(LDFLAGS) -L. -lsqlite3 $(LDFLAGS.zlib) $(LDFLAGS.math)
sqlite3-shell-deps.1 = $(TOP)/sqlite3.c
sqlite3-shell-deps.0 = $(libsqlite3.DLL)
#
@@ -245,7 +248,7 @@ sqlite3$(T.exe): $(TOP)/shell.c $(sqlite3-shell-deps.$(ENABLE_STATIC_SHELL))
$(sqlite3-shell-static.flags.$(STATIC_CLI_SHELL)) \
-I. $(OPT_FEATURE_FLAGS) $(SHELL_OPT) \
$(CFLAGS) $(CFLAGS.readline) $(CFLAGS.icu) \
- $(LDFLAGS) $(LDFLAGS.readline)
+ $(LDFLAGS.readline)
sqlite3$(T.exe)-1:
sqlite3$(T.exe)-0: sqlite3$(T.exe)
diff --git a/autosetup/proj.tcl b/autosetup/proj.tcl
index 6e78d876be..62c08b3702 100644
--- a/autosetup/proj.tcl
+++ b/autosetup/proj.tcl
@@ -1170,6 +1170,10 @@ proc proj-check-rpath {} {
if {"" eq $wl} {
set wl [proj-cc-check-Wl-flag -R$lp]
}
+ if {"" eq $wl} {
+ # HP-UX: https://sqlite.org/forum/forumpost/d80ecdaddd
+ set wl [proj-cc-check-Wl-flag +b $lp]
+ }
define LDFLAGS_RPATH $wl
}
}
@@ -1179,7 +1183,7 @@ proc proj-check-rpath {} {
#
# @proj-check-soname ?libname?
#
-# Checks whether CC supports the -Wl,soname,lib... flag. If so, it
+# Checks whether CC supports the -Wl,-soname,lib... flag. If so, it
# returns 1 and defines LDFLAGS_SONAME_PREFIX to the flag's prefix, to
# which the client would need to append "libwhatever.N". If not, it
# returns 0 and defines LDFLAGS_SONAME_PREFIX to an empty string.
@@ -1195,6 +1199,10 @@ proc proj-check-soname {{libname "libfoo.so.0"}} {
if {[cc-check-flags "-Wl,-soname,${libname}"]} {
define LDFLAGS_SONAME_PREFIX "-Wl,-soname,"
return 1
+ } elseif {[cc-check-flags "-Wl,+h,${libname}"]} {
+ # HP-UX: https://sqlite.org/forum/forumpost/d80ecdaddd
+ define LDFLAGS_SONAME_PREFIX "-Wl,+h,"
+ return 1
} else {
define LDFLAGS_SONAME_PREFIX ""
return 0
diff --git a/manifest b/manifest
index 854f82c84d..c35a614f57 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sdocumentation\scomment\sfor\sSQLITE_CHECKPOINT_NOOP.
-D 2025-09-08T14:32:32.174
+C Merge\strunk\schanges\sinto\sthis\sbranch.
+D 2025-09-08T14:40:17.556
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -17,7 +17,7 @@ F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
F art/sqlite370.svg 40b7e2fe8aac3add5d56dd86ab8d427a4eca5bcb3fe4f8946cb3794e1821d531
F auto.def 44a0d1bf09d78355fc88251ccbf8e64e6341fd89c11de68a01c3645e53a2bade
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
-F autoconf/Makefile.in d0926d2309e563b5ebdfd711e5c218533acab79829a05eef4e97c3a92e17bf42
+F autoconf/Makefile.in 306f500fce8cae9e1af9459f1ac7fe89ce46999594ef3fdc62dc9d7d651fb091
F autoconf/Makefile.msc f15ad424ca2820df8e39d9157965710af0a64d87773706706a12ea4f96e3a0d8
F autoconf/README.first f1d3876e9a7852c22f275a6f06814e64934cecbc0b5b9617d64849094c1fd136
F autoconf/README.txt b749816b8452b3af994dc6d607394bef3df1736d7e09359f1087de8439a52807
@@ -46,7 +46,7 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1821baf61bc86a7e
F autosetup/jimsh0.c 563b966c137a4ce3c9333e5196723b7ac0919140a9d7989eb440463cd855c367
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
-F autosetup/proj.tcl 0582bccdd45ae01f4f6874bdc84109648869b1e09c9746402de176f63cd8044e
+F autosetup/proj.tcl ec30c4bc301b6e9eb937655744a7315f863f804fc66400d975bcf9352ac96a1d
F autosetup/sqlite-config.tcl f2d2cf0917a17068ab2897b2009e31a05a4481a0786cd6ea15f643fef325bbe3
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F autosetup/teaish/README.txt b40071e6f8506500a2f7f71d5fc69e0bf87b9d7678dd9da1e5b4d0acbf40b1ca
@@ -743,7 +743,7 @@ F src/resolve.c f8d1d011aba0964ff1bdccd049d4d2c2fec217efd90d202a4bb775e926b2c25d
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c b95181711d59c36d9789e67f76c4cfec64b99f9629a50be5e6566e117b87d957
F src/shell.c.in 51c8452b3e6b9a0dfa3df853dd16f147e5e4ae2002deb775cf8a2fccf01c3c6c
-F src/sqlite.h.in fc5802897125fcbde28002f835bdab4ee15d00887c9792f6b69a7961a4abb3b1
+F src/sqlite.h.in 79dd3963888543f3120536608bf51024c93c7eb163a255098ffd569710189781
F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479
F src/sqlite3ext.h 0bfd049bb2088cc44c2ad54f2079d1c6e43091a4e1ce8868779b75f6c1484f1e
F src/sqliteInt.h 27c73e48878d31ef230ba867d1f8c3af6aed357fd93ccc605d3f1aae007ea62b
@@ -1147,6 +1147,7 @@ F test/fts3am.test 218aa6ba0dfc50c7c16b2022aac5c6be593d08d8
F test/fts3an.test a49ccadc07a2f7d646ec1b81bc09da2d85a85b18
F test/fts3ao.test 266989148fec6d9f1bb6c5382f7aa3dcea0e9cd444576e28dd2b9287ac7dd220
F test/fts3atoken.test dc2078ce464914efe3a8dfc545dd034a0fc14f2ab425c240471d5a5f1c721400
+F test/fts3atoken2.test aa6664d26277064844ead962f5988c28b091c51b112f36d30fa33bd83fecf906
F test/fts3auto.test 649aa4c198d7acc5cd6355e19ee073d051c40d9e88a43fc3d88af46bdf3e99d5
F test/fts3aux1.test 1880eaa75c586cd10f53080479a2b819b3915ae7ce55c4e0ba8f1fe05ac0a6a7
F test/fts3aux2.test 2459e7fa3e22734aed237d1e2ae192f5541c4d8b218956ad2d90754977bf907f
@@ -2173,8 +2174,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 48be3d020cf0c732557b3d956198a1abcab79424be03f447e2bb89f4d68dc8ff
-R 22a72c4d94910c8e62c5c76a51f0577a
+P 2b9c495d02724f19ab16612b0e671dfc612f04342222d9901cd0debd08da4cf0 d7b2fb5363203f475887f277aed4a91e5a83440c169a86b3bf1e4fdf130bbaed
+R 2812d107bd7816cef0e6e9da5e6ce373
U dan
-Z ca2bc409510535e67e326756e9039e49
+Z 39018662c5084e192865b8068d934eec
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 853002a842..385ba8557c 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-2b9c495d02724f19ab16612b0e671dfc612f04342222d9901cd0debd08da4cf0
+3bac76a86baae830d4fdc9e4055470d84549fde56b4cf217ebd96cb486554461
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 8335eb1454..3c17808fc3 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -2343,17 +2343,20 @@ struct sqlite3_mem_methods {
**
** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]
**
SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
-** ^This option is used to enable or disable the
-** [fts3_tokenizer()] function which is part of the
-** [FTS3] full-text search engine extension.
-** There must be two additional arguments.
-** The first argument is an integer which is 0 to disable fts3_tokenizer() or
-** positive to enable fts3_tokenizer() or negative to leave the setting
-** unchanged.
-** The second parameter is a pointer to an integer into which
-** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
-** following this call. The second parameter may be a NULL pointer, in
-** which case the new setting is not reported back.
+** ^This option is used to enable or disable using the
+** [fts3_tokenizer()] function - part of the [FTS3] full-text search engine
+** extension - without using bound parameters as the parameters. Doing so
+** is disabled by default. There must be two additional arguments. The first
+** argument is an integer. If it is passed 0, then using fts3_tokenizer()
+** without bound parameters is disabled. If it is passed a positive value,
+** then calling fts3_tokenizer without bound parameters is enabled. If it
+** is passed a negative value, this setting is not modified - this can be
+** used to query for the current setting. The second parameter is a pointer
+** to an integer into which is written 0 or 1 to indicate the current value
+** of this setting (after it is modified, if applicable). The second
+** parameter may be a NULL pointer, in which case the value of the setting
+** is not reported back. Refer to [FTS3] documentation for further details.
+**
**
** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]]
** SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
@@ -9785,7 +9788,7 @@ void sqlite3_log(int iErrCode, const char *zFormat, ...);
** is the number of pages currently in the write-ahead log file,
** including those that were just committed.
**
-** The callback function should normally return [SQLITE_OK]. ^If an error
+** ^The callback function should normally return [SQLITE_OK]. ^If an error
** code is returned, that error will propagate back up through the
** SQLite code base to cause the statement that provoked the callback
** to report an error, though the commit will have still occurred. If the
@@ -9793,13 +9796,26 @@ void sqlite3_log(int iErrCode, const char *zFormat, ...);
** that does not correspond to any valid SQLite error code, the results
** are undefined.
**
-** A single database handle may have at most a single write-ahead log callback
-** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any
-** previously registered write-ahead log callback. ^The return value is
-** a copy of the third parameter from the previous call, if any, or 0.
-** ^Note that the [sqlite3_wal_autocheckpoint()] interface and the
-** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
-** overwrite any prior [sqlite3_wal_hook()] settings.
+** ^A single database handle may have at most a single write-ahead log
+** callback registered at one time. ^Calling [sqlite3_wal_hook()]
+** replaces the default behavior or previously registered write-ahead
+** log callback.
+**
+** ^The return value is a copy of the third parameter from the
+** previous call, if any, or 0.
+**
+** ^The [sqlite3_wal_autocheckpoint()] interface and the
+** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and
+** will overwrite any prior [sqlite3_wal_hook()] settings.
+**
+** ^If a write-ahead log callback is set using this function then
+** [sqlite3_wal_checkpoint_v2()] or [PRAGMA wal_checkpoint]
+** should be invoked periodically to keep the write-ahead log file
+** from growing without bound.
+**
+** ^Passing a NULL pointer for the callback disables automatic
+** checkpointing entirely. To re-enable the default behavior, call
+** sqlite3_wal_autocheckpoint(db,1000) or use [PRAGMA wal_checkpoint].
*/
void *sqlite3_wal_hook(
sqlite3*,
@@ -9816,7 +9832,7 @@ void *sqlite3_wal_hook(
** to automatically [checkpoint]
** after committing a transaction if there are N or
** more frames in the [write-ahead log] file. ^Passing zero or
-** a negative value as the nFrame parameter disables automatic
+** a negative value as the N parameter disables automatic
** checkpoints entirely.
**
** ^The callback registered by this function replaces any existing callback
@@ -9832,9 +9848,10 @@ void *sqlite3_wal_hook(
**
** ^Every new [database connection] defaults to having the auto-checkpoint
** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
-** pages. The use of this interface
-** is only necessary if the default setting is found to be suboptimal
-** for a particular application.
+** pages.
+**
+** ^The use of this interface is only necessary if the default setting
+** is found to be suboptimal for a particular application.
*/
int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
diff --git a/test/fts3atoken2.test b/test/fts3atoken2.test
new file mode 100644
index 0000000000..f6a2a29ab1
--- /dev/null
+++ b/test/fts3atoken2.test
@@ -0,0 +1,106 @@
+# 2025 September 5
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#*************************************************************************
+# This file implements regression tests for SQLite library. The focus
+# of this script is testing the pluggable tokeniser feature of the
+# FTS3 module.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+# If SQLITE_ENABLE_FTS3 is defined, omit this file.
+ifcapable !fts3 {
+ finish_test
+ return
+}
+
+set ::testprefix fts3atoken2
+
+
+reset_db
+sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 0
+
+# With ENABLE_FTS3_TOKENIZER set to 0:
+#
+# * It is not possible to get a pointer to a token implementation
+# using single arg fts3_tokenize() unless the name of the tokenizer
+# is a bound paramter - function should return NULL.
+#
+# * But it is possible with a bound parameter.
+#
+do_execsql_test 1.1.1 {
+ SELECT typeof( fts3_tokenizer('simple') );
+} {null}
+set bound "simple"
+do_execsql_test 1.1.2 {
+ SELECT typeof( fts3_tokenizer($bound) );
+} {blob}
+
+# With ENABLE_FTS3_TOKENIZER set to 0:
+#
+# * It is not possible to create a token implementation using anything
+# other than a bound parameter.
+#
+# * But it is possible with a bound parameter.
+#
+set literal [db one {SELECT quote( fts3_tokenizer($bound) )}]
+set blob [db one {SELECT fts3_tokenizer($bound) }]
+
+do_catchsql_test 1.2.1 "
+ SELECT fts3_tokenizer('mytok', $literal)
+" {1 {fts3tokenize disabled}}
+do_catchsql_test 1.2.2 {
+ CREATE VIRTUAL TABLE x1 USING fts3(col, tokenize=mytok);
+} {1 {unknown tokenizer: mytok}}
+do_catchsql_test 1.2.3 {
+ SELECT fts3_tokenizer('mytok', $blob)
+} {0 {{}}}
+do_execsql_test 1.2.4 {
+ CREATE VIRTUAL TABLE x1 USING fts3(col, tokenize=mytok);
+}
+
+# With ENABLE_FTS3_TOKENIZER set to 1:
+#
+# * It is possible to get a pointer to a token implementation with either
+# a bound parameter or a literal.
+#
+sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1
+set bound "simple"
+do_execsql_test 1.3.1 {
+ SELECT typeof( fts3_tokenizer('simple') );
+} {blob}
+do_execsql_test 1.3.2 {
+ SELECT typeof( fts3_tokenizer($bound) );
+} {blob}
+
+# With ENABLE_FTS3_TOKENIZER set to 1:
+#
+# * It is not possible to create a token implementation using either
+# a bound parameter or a literal.
+#
+set literal [db one {SELECT quote( fts3_tokenizer($bound) )}]
+set blob [db one {SELECT fts3_tokenizer($bound) }]
+
+do_execsql_test 1.4.1 "
+ SELECT typeof( fts3_tokenizer('mytok2', $literal) );
+" {blob}
+do_execsql_test 1.4.2 {
+ CREATE VIRTUAL TABLE x2 USING fts3(col, tokenize=mytok2);
+}
+do_execsql_test 1.4.3 {
+ SELECT typeof( fts3_tokenizer('mytok3', $blob) );
+} {blob}
+do_execsql_test 1.4.4 {
+ CREATE VIRTUAL TABLE x3 USING fts3(col, tokenize=mytok3);
+}
+
+finish_test
+