If the FUZZDB environment variable is set when running testrunner.tcl and
that env-var points to a fuzzcheck database, then suppliment the fuzzcheck
tests with that extra database.
Remove long-obsolete performance testing scripts from the tools/ folder.
The test/speedtest.tcl script is what should be used these days. This
is just cruft clean-up.
stephan [Mon, 28 Apr 2025 09:25:19 +0000 (09:25 +0000)]
tea: pull in upstream teaish. Consolidate the build definition from the upstream build and this one to ease maintenace. Improve compatibility with historical TEA usage of --with-tcl=... (it insists on a /lib suffix for that path).
stephan [Sun, 27 Apr 2025 04:21:27 +0000 (04:21 +0000)]
autoconf/tea: the default value of --threadsafe=X is now based on a pkgconfig query using the target tclsh, which is much more reliable than grepping Tcl's linker flags. Doc touchups.
Fix an off-by-one error in an assert(), discovered by oss-fuzz. This is a
harmless error in as much as assert()s are disabled in production builds, and
because the off-by-one only occurs on nonsensical CREATE INDEX statements.
When logging errors using sqlite3_log() and the error text includes the
text of an SQL statement, but the SQL statement text at the end so that if
the error message buffer overflows it is the SQL statement text that gets
truncated, not the statement of the problem.
stephan [Wed, 16 Apr 2025 21:53:01 +0000 (21:53 +0000)]
Latest upstream teaish. Most notably it adds the ability for the extension to specify a minimum Tcl version, and this build now enforces a minimum Tcl of 8.6.
Attempt to provide EBCDIC translations to the tables in the JSON
implementation. The SQLite developers do not have access to any
computers using EBCDIC and so have no way to test this patch, and
cannot vouch for its accuracy.
stephan [Wed, 16 Apr 2025 14:21:48 +0000 (14:21 +0000)]
A portability fix for proj.tcl: some Tcl builds do not like (array set x $someArray). Also better --mandir handling on Haiku (where the former problem was found).7
Correctly handle the case of a multi-column UNIQUE constraint that contains
the ROWID as one of it columns, and then the columns of that UNIQUE are
used in a row-value IN operator as a WHERE clause constraint. Reported by
[forum:/forumpost/b9647a113b465950|forum post b9647a113b]. Problem
introduced by [723f1be3d4a905a6], part of ticket [da78413751863].
Improved estimate on the number of output rows in a recursive common table expression
that uses the UNION operator. Follow-up to [f911f1c4977fbcae] and it's output row
estimate changes associated with DISTINCT queries.
stephan [Sat, 12 Apr 2025 21:47:18 +0000 (21:47 +0000)]
tea build: use autosetup's file-normalize instead of Tcl's (file normalize) because the latter throws on cygwin for names like '.' and './'. Update a doc URL.
dan [Thu, 10 Apr 2025 15:01:58 +0000 (15:01 +0000)]
Fix an obscure problem allowing the propagate-constants optimization to improperly substitute a column of a sub-query with NONE affinity. [forum:/forumpost/0109bca824|Forum post 2025-04-08T14:18:45Z].
stephan [Wed, 9 Apr 2025 13:32:15 +0000 (13:32 +0000)]
Doc updates in proj.tcl. Improve configure check for whether fdatasync or nanosleep require -lrt. Remove references to 'tcl-config' build mode from sqlite-config.tcl, as that build is now implemented without a depency on sqlite-config.tcl because the TEA build's needs are considerably more modest.
stephan [Mon, 7 Apr 2025 18:29:57 +0000 (18:29 +0000)]
During the post-configure validation of @VAR@ references, ignore commented-out references in files which seem (based on their name) to be makefiles, as it's sometimes handy to comment-out such vars during development of a configure script and its corresponding makefile(s).
stephan [Sat, 5 Apr 2025 08:48:19 +0000 (08:48 +0000)]
Add a note that SQLite's copy of proj.tcl can be considered the "canonical copy" for practical purposes. We now have at least 3 copies of it floating around in other trees.
stephan [Fri, 4 Apr 2025 20:50:00 +0000 (20:50 +0000)]
Account for the Mac-specific -instal_name linker flag, which is apparently needed for linking some third-party code. See [forum:5651662b8875ec0a|forum post 5651662b8875ec0a].
stephan [Fri, 4 Apr 2025 15:41:19 +0000 (15:41 +0000)]
Improve --all flag handling so that combinations of (--all --disable-FEATURE) and (--disable-all --FEATURE) work more intuitively. Add missing handling of the --fts3 flag (it was accepted but ignored before). Add TCL_LIBS to the set of vars exported via tclConfig.sh for use in the tea build.
stephan [Fri, 4 Apr 2025 02:40:08 +0000 (02:40 +0000)]
On HaikuOS, if --prefix is not explicitly provided then default it to /boot/home/config/non-packaged, based on an off-list discussion with HaikuOS user BrickViking.
stephan [Thu, 3 Apr 2025 13:24:38 +0000 (13:24 +0000)]
Add the --static-cli-shell configure flag to the canonical build, which works like --static-tclsqlite3 but applies to the CLI shell (statically linking it, which only works if all requisite libs are available in static form). It is not called --static-shell because that flag has a completely different legacy meaning in the autoconf build and this flight might eventually be added to that build, so would collide there.
stephan [Thu, 3 Apr 2025 00:46:34 +0000 (00:46 +0000)]
Add the --static-tclsqlite3 configure flag (canonical build only) to build tclsqlite3 as a static binary. This will only work on systems which have static versions of all requisite libraries.
stephan [Wed, 2 Apr 2025 23:34:35 +0000 (23:34 +0000)]
Add experimental --static-tclsqlite3 configure flag to build tclsqlite3 statically, which only works if static libtcl/etc. are available. Currently intended for docker builds via Alpine Linux.
This is an experimental optimization that attempts to keep a JSONB value
the same size (same number of bytes) after doing a replace of an elements
with a slightly smaller element, by denormalizing the size field. This
can perhaps avoid unnecessary page updates and memmove() operations when
making small changes in the middle of a large JSONB value.
stephan [Mon, 31 Mar 2025 13:08:29 +0000 (13:08 +0000)]
Ensure that the compilation of extensions get the same CFLAGS as the core lib. Move the feature flags enabled by --dev out of TARGET_DEBUG and into OPT_FEATURE_FLAGS (for consistency). Rename the make-internal gcov-related flags to be more descriptive. At the end of the configure script, if SQLITE_DEBUG is active then emit a note reminding the builder that performance will suffer.