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.
stephan [Fri, 28 Mar 2025 15:36:49 +0000 (15:36 +0000)]
CLI shell: make (.output off) an alias for (.output /dev/null) or (.output nul), depending on the platform. Discussed in [forum:633979ce307f1cc6|forum post 633979ce307f1cc6].
jan.nijtmans [Thu, 27 Mar 2025 17:30:49 +0000 (17:30 +0000)]
Fix for forum-post [/forum/forumpost/b5fde3596c|b5fde3596c]. Also fix encoding issue for non-ASCII characters.
Also includes a fix from Stephan Beal, about a missing <stdint.h> include.
drh [Wed, 26 Mar 2025 14:45:15 +0000 (14:45 +0000)]
Attempt to reduce the amount of retry time when trying to open
an inaccessible database file on Windows. See
[forum:/forumpost/e7991420f54dca50|forum thread e7991420f5]
stephan [Sun, 23 Mar 2025 23:04:48 +0000 (23:04 +0000)]
Correct a --force flag which should be -force in a TCL file delete call. Some TCL versions (like the one on my system) accepts either but others don't. Problem reported in [forum:c02224d862|forum post c02224d862].
drh [Sat, 22 Mar 2025 22:55:33 +0000 (22:55 +0000)]
Fix the generate_series() enhancement from check-in [d50b784807333c54]
so that it works even if the number that "value" is being compared against
is a non-integer floating point number. Bug reported by
[forum:/forumpost/0d5d63257e3ff4f6|forum post 0d5d63257].
stephan [Sat, 22 Mar 2025 19:07:54 +0000 (19:07 +0000)]
Replace use of autosetup/lib/*.auto for sqlite-custom-... features to avoid the possibility of multiple files being loaded (in an unpredictable order) for that purpose. Instead look for autosetup/sqlite-custom.tcl and source it if it exists. The intent is that sqlite-custom.tcl only ever be added in vendor-specific branches and never in the trunk.
stephan [Sat, 22 Mar 2025 18:41:48 +0000 (18:41 +0000)]
In the post-configure validation, ensure than no more than one autosetup/lib/*.auto file is found, for reasons explained in the validation's error message.
stephan [Sat, 22 Mar 2025 17:28:29 +0000 (17:28 +0000)]
Document the new configuration customization approach and extend it to enable sqlite-custom-flags to return an empty string to denote that it does not require any new flags (it may still customize flag default values in such cases).
stephan [Sat, 22 Mar 2025 17:00:32 +0000 (17:00 +0000)]
Teach mkautoconfamal.sh to avoid copying autosetup/local.tcl and autosetup/*.auto except for autosetup/lib/CURRENT-BRANCH-NAME.auto (if any), the intent being to use lib/CURRENT-BRANCH-NAME.auto for branch-specific configuration customizations.
stephan [Sat, 22 Mar 2025 16:14:34 +0000 (16:14 +0000)]
Add a mechanism to the configure script to allow certain client-specific builds to extend or override the configure options without having to edit sqlite-config.tcl, the goal being to reduce merge conflicts in those builds when updating sqlite-config.tcl from the canonical copy.
stephan [Sat, 22 Mar 2025 12:15:13 +0000 (12:15 +0000)]
In the autoconf bundle, do not strip binaries during installation, for parity with the canonical build and the legacy build. Discussed in [forum:9a67df63eda9925c|forum post 9a67df63eda9925c]. A potential TODO here is to add a configure flag which either enables or disables stripping.
stephan [Fri, 21 Mar 2025 16:06:16 +0000 (16:06 +0000)]
Proxy configure's msg-debug with proc-debug, which works the same except that it prepends the name of the calling proc to the debug message. No functional changes.
drh [Thu, 20 Mar 2025 11:47:39 +0000 (11:47 +0000)]
Fix a problem in the sqlite_dbpage() table-valued function when it is
trying to truncate a file in locking-mode=EXCLUSIVE and the file was
obtained via sqlite3_deserialize(). Problem found by dbsqlfuzz.
drh [Tue, 18 Mar 2025 20:15:16 +0000 (20:15 +0000)]
Change the generate_series() table-valued function so that its rowid is just an
alias for its value. This allows it to be used as the RHS operand of a
RIGHT JOIN. This fixes the issue raised by
[forum:/forumpost/1e17219c88|forum post 1e17219c88].
dan [Tue, 18 Mar 2025 19:21:04 +0000 (19:21 +0000)]
Fix a problem that could occur when the RHS of an IN operator was a compound SELECT featuring an ORDER BY on a subquery that was flattened into one of the component SELECTs introduced by [baa83b460c677c21]. Forum post [/forumpost/1e17219c88].
stephan [Tue, 18 Mar 2025 10:28:56 +0000 (10:28 +0000)]
Update the docs in tool/mkccode.tcl to reflect that it's more generic than it was when the docs were written. Change the shebang line to use /bin/env tclsh instead of a hard-coded tclsh path.
stephan [Sun, 16 Mar 2025 14:05:42 +0000 (14:05 +0000)]
Fix a long-standing filename digest computation bug in the OPFS SAHPool VFS which caused all VFS-stored filenames to have a digest value of 0. See [/forumpost/042d53c928382021] and for full details.
stephan [Sun, 16 Mar 2025 13:09:21 +0000 (13:09 +0000)]
Add --asan-fsanitize=... configure flag to the canonical build to optionally set -fsantize flags for the fuzzcheck-asan tool. Teach proj-check-fsanitiz to fail for flags which the compiler emits any warning for, for reasons described in its comments.
drh [Sun, 16 Mar 2025 00:13:29 +0000 (00:13 +0000)]
Rework the run-fuzzcheck makefile target so that it better exploit parallelism.
Test case "<tt>make -j16 run-fuzzcheck FUZZDB=20250222.db</tt>"
went from 596 seconds down to 107 seconds.
drh [Sat, 15 Mar 2025 19:55:19 +0000 (19:55 +0000)]
Make use of the C99 flexible array feature, when available, so that
the -fsanitize=bounds-strict option can be used, when available.
[forum:/forumpost/311dbf9a1cadfae6|Forum thread 311dbf9a1c].