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].
drh [Sat, 15 Mar 2025 13:04:16 +0000 (13:04 +0000)]
Use flexible arrays in the recovery extension and in the fuzzcheck test program.
Adjust the unix makefile to use -fsanitize=bounds-strict when building
fuzzcheck-asan.
drh [Fri, 14 Mar 2025 18:10:02 +0000 (18:10 +0000)]
Make use of the flexible-array feature of C99, when available, to try to
pacify -fsanitize=strict-bounds. This check-in fixes the core. There is
more yet to do in FTS3, RTREE, and in FTS5.
drh [Thu, 13 Mar 2025 18:51:18 +0000 (18:51 +0000)]
Fix the generate_series extension for the case where the termination value
is not an even multiple of the step from the start value and there is also
a value=NNN constraint in the WHERE clause.
[forum:/info/bf2dc8e909983511|Forum post bf2dc8e9]
drh [Tue, 11 Mar 2025 12:19:27 +0000 (12:19 +0000)]
The substitute "puts" command used by the Windows implementation of
sqlite3_analyzer must invoke fflush() after each line of output. Otherwise
the output can be truncated when redirected into a file.
stephan [Tue, 11 Mar 2025 11:24:52 +0000 (11:24 +0000)]
Teach testrunner.tcl to distinguish Cygwin from Windows. This gets it running but then all downstream tests fail, at least in part because of the build target name discrepancies between the platform which requires .exe and those which do not.
drh [Mon, 10 Mar 2025 22:31:55 +0000 (22:31 +0000)]
Ensure that the TEMP database has been initialized at the beginning of
a call to sqlite3_open_blob() for the TEMP database. Fix for the issue
reported by [forum:/forumpost/0a556d619b|forum post 0a556d619b].
stephan [Mon, 10 Mar 2025 17:28:43 +0000 (17:28 +0000)]
Add an explicit db close to test/walsetlk.test to work around an unjustified test failure on Windows when the walsetlk tests are run in the same invocation of testfixture.exe in Windows.
stephan [Mon, 10 Mar 2025 15:27:17 +0000 (15:27 +0000)]
Ensure that the 'clean' target for Makefile.msc cleans up the testdir dir, analog to how the canonical makefile works, as stale files there have been leading to test failures.