]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 months agotestrunner.db should be in WAL mode for improved concurrency while running tcl9
drh [Wed, 31 Jul 2024 22:26:04 +0000 (22:26 +0000)] 
testrunner.db should be in WAL mode for improved concurrency while running
"watch sqlite3 test/testrunner.tcl status".

FossilOrigin-Name: f23ad0979865f3c11a3dbd0598ee7c4e2eabeaf1863d000fc0242e18890a4a11

11 months agoMake the #include section of tclsqlite.c the same as tclsqlite.h.
drh [Wed, 31 Jul 2024 22:25:25 +0000 (22:25 +0000)] 
Make the #include section of tclsqlite.c the same as tclsqlite.h.

FossilOrigin-Name: 2afadbeb124d6d7bb81d473379269014ebd8601f98f231e2218f54350a2e5fd3

11 months agoFix typo in testrunner.tcl for the "status" command that was causing it
drh [Wed, 31 Jul 2024 22:17:26 +0000 (22:17 +0000)] 
Fix typo in testrunner.tcl for the "status" command that was causing it
to fail if any errors were seen.

FossilOrigin-Name: 8327c5ed535c57c4082211a50bfb1c32ea5d5fe1cf71f37798d8b58e88948ac2

11 months agoUse `<tcl.h>` instead of `"tcl.h"` to include the TCL interface.
drh [Wed, 31 Jul 2024 21:59:29 +0000 (21:59 +0000)] 
Use `<tcl.h>` instead of `"tcl.h"` to include the TCL interface.

FossilOrigin-Name: 4e32d4aed7c487ee9ed39a7e4486c2989a01781a3edbe9cdce52c6ed357f6366

11 months agoFix the tclsqlite.c TCL interface module so that it works with both Tcl8 and
drh [Wed, 31 Jul 2024 21:46:46 +0000 (21:46 +0000)] 
Fix the tclsqlite.c TCL interface module so that it works with both Tcl8 and
Tcl9.  Make changes across the TCL-based test harness to enable SQLite to
be tested with either Tcl8 or Tcl9.  Get the --with-tcl= argument on the
configure script working.  Testing changes only - no changes to the SQLite core.

FossilOrigin-Name: 2a04b1bea12b0b4c3387d675f487337533ac0813248f70085398485e4cacd691

11 months agoMore tweaks to testfixture-implemented TCL commands to make them safe for Tcl9.
drh [Wed, 31 Jul 2024 19:57:22 +0000 (19:57 +0000)] 
More tweaks to testfixture-implemented TCL commands to make them safe for Tcl9.

FossilOrigin-Name: 67897ca97d8c98e119a498a3adb39548a579e12ee477e9dd74e9564a6f5e4c2b

11 months agoUnder Tcl9, the %x format letter truncates to 32-bits. Must use %llx in order
drh [Wed, 31 Jul 2024 19:56:14 +0000 (19:56 +0000)] 
Under Tcl9, the %x format letter truncates to 32-bits.  Must use %llx in order
to get a 64-bit rendering.

FossilOrigin-Name: a3044e0ae65c099d76bf04536e223e70d89971688627c342252951f6c65f49d1

11 months agoFixes to testfixture routines needed to test snapshots.
drh [Wed, 31 Jul 2024 17:15:24 +0000 (17:15 +0000)] 
Fixes to testfixture routines needed to test snapshots.

FossilOrigin-Name: 66f61c3b35383b2575774d309043a722cc87a53d03518d339d6dbdcf342adc93

11 months agoFix a typo in testrunner_data.tcl that prevented --with-tcl specifications
drh [Wed, 31 Jul 2024 16:37:02 +0000 (16:37 +0000)] 
Fix a typo in testrunner_data.tcl that prevented --with-tcl specifications
from being carried through into sub-builds.  Adjust test cases to account
for new floating-point differences discovered when --with-tcl was fixed.

FossilOrigin-Name: b8f81351914deac99b14be6bb5e4096c1efed9bdb057750825760f09dae04656

11 months agoRemove obsolete testfixture TCL commands formerly required by Windows
drh [Wed, 31 Jul 2024 15:04:37 +0000 (15:04 +0000)] 
Remove obsolete testfixture TCL commands formerly required by Windows
but now handled by Tcl itself.  Update tests case accordingly.

FossilOrigin-Name: 4f065fb638b24b33283518af8ad55f28a49cfac4086fa5e4568e2f3a6814962d

11 months agoFix problems uncovered while testing Tcl9 on Windows.
drh [Wed, 31 Jul 2024 13:00:18 +0000 (13:00 +0000)] 
Fix problems uncovered while testing Tcl9 on Windows.

FossilOrigin-Name: d5523c77fd0bcdc8344971a116d6ce9657f2b6daddeb7d936cd7607163a36744

11 months agoMinor adjustments to get Tcl9-based testing working on Macs.
drh [Wed, 31 Jul 2024 12:19:16 +0000 (12:19 +0000)] 
Minor adjustments to get Tcl9-based testing working on Macs.

FossilOrigin-Name: 066c8672ee85a6ce972de38fcd3793fc2c1ef4f21c3de2379746d0ff18df8dc0

11 months agoAdjust the configure script so that the --with-tcl option is used to
drh [Wed, 31 Jul 2024 11:42:47 +0000 (11:42 +0000)] 
Adjust the configure script so that the --with-tcl option is used to
find the appropriate tclsh.

FossilOrigin-Name: 6fb9e37c751cd1a411c77f792794e1abafa5c40ad4dda8d433600d44d525a97c

11 months agoPatch to testrunner.tcl so that it works with Tcl9's pedantic UTF-8 checking.
drh [Wed, 31 Jul 2024 11:12:13 +0000 (11:12 +0000)] 
Patch to testrunner.tcl so that it works with Tcl9's pedantic UTF-8 checking.

FossilOrigin-Name: 8d4a23d32dc16b115153e6e100ba3ba15273c3e37310e8a1b4bace885c5383a8

11 months agoFixes to tclsqlite.c to facilitate TEA installs.
drh [Wed, 31 Jul 2024 10:59:19 +0000 (10:59 +0000)] 
Fixes to tclsqlite.c to facilitate TEA installs.

FossilOrigin-Name: 7157c3c910565c9385a028793a0c0106c5064ab6a8a6efbe29dd1f1cdb2bd48d

11 months agoFix a problem with strictly conforming UTF8 in shell1.test.
drh [Wed, 31 Jul 2024 02:01:19 +0000 (02:01 +0000)] 
Fix a problem with strictly conforming UTF8 in shell1.test.

FossilOrigin-Name: 8ee187f98d310e1e7cf6c3fdf000c19e98a9f11e01436c3c407df04da79aa7c0

11 months agoAdjust a few tests that don't work even with the new floating point
drh [Wed, 31 Jul 2024 01:53:48 +0000 (01:53 +0000)] 
Adjust a few tests that don't work even with the new floating point
comparison routine.

FossilOrigin-Name: 895125a4895099df7c3841ca7c34697ba17fd667bddbc2fd7148f7aa9d6d2b9d

11 months agoImplement a new comparison routine to compare text renderings of
drh [Wed, 31 Jul 2024 01:45:14 +0000 (01:45 +0000)] 
Implement a new comparison routine to compare text renderings of
floating point values.  This gets the number of failures down to just 5.
But the routine needs work, and probably refactoring.

FossilOrigin-Name: 71f2ee5db01150707401804b136641170e7ed44760fccec20de19184e4d0a840

11 months agoAll tests in "make test" now pass with Tcl9, except for about 198 cases where
drh [Tue, 30 Jul 2024 20:39:05 +0000 (20:39 +0000)] 
All tests in "make test" now pass with Tcl9, except for about 198 cases where
the error involves small differences in the rendering to floating point
values.

FossilOrigin-Name: 8e27f5326c69aa4fb6f3f1f42668ab1b08140ab0a614ac4a9d94679c8fb9734e

11 months agoMore adjustments to the incrblob channel: Apparently you need to wait
drh [Tue, 30 Jul 2024 18:49:20 +0000 (18:49 +0000)] 
More adjustments to the incrblob channel:  Apparently you need to wait
until the close2Proc is called with a flag of 0 before actually shutting
down the channel.

FossilOrigin-Name: fa549a5507b5f805b469b4360c11155aa9d22043f01f6d9428bf44d0f2351eb0

11 months agoAdjustments to test cases for session so that they work with Tcl9.
drh [Tue, 30 Jul 2024 18:42:31 +0000 (18:42 +0000)] 
Adjustments to test cases for session so that they work with Tcl9.

FossilOrigin-Name: d417415b967e62d41667e14ebf5455932ebf38d218a941f13878f0aba6d19bc8

11 months agoTcl_ChannelType implementations for Tcl9 apparently require that
drh [Tue, 30 Jul 2024 18:15:59 +0000 (18:15 +0000)] 
Tcl_ChannelType implementations for Tcl9 apparently require that
wideSeekProc be implemented.  Also adjust minor test script issues for
fts5 tests so that they can be run sequentially and so that they do not
depend on the specific floating point output formats generated by Tcl.

FossilOrigin-Name: 19fda979c5dc1a385ed3f8ab8df34388c1acfc7ff951fe1b183a79186bd20cdb

11 months agoGet rid of "-encoding binary" across all test cases, as that is no longer
drh [Tue, 30 Jul 2024 17:09:51 +0000 (17:09 +0000)] 
Get rid of "-encoding binary" across all test cases, as that is no longer
supported in Tcl9.  Use "-translation binary" instead.

FossilOrigin-Name: e0d9670dd98a22d2e22aac8ba8720787a05e280e18ec9b2d4323f947c83718f5

11 months agoUse the SQLite format() function to format floating point values for test
drh [Tue, 30 Jul 2024 16:59:33 +0000 (16:59 +0000)] 
Use the SQLite format() function to format floating point values for test
results, to avoid inconsistences in TCL versions.

FossilOrigin-Name: 6a63c472190dafb36582c116c925bbcbe48c3a2f3217fc1ffcb64a733b0151e1

11 months agoFix the incrblob channel so that partial close works with Tcl9.
drh [Tue, 30 Jul 2024 16:51:51 +0000 (16:51 +0000)] 
Fix the incrblob channel so that partial close works with Tcl9.

FossilOrigin-Name: d54ec2de78c2aed12be643e59a30b6827fe4728a0ab6504dd64ee9116e5f885a

11 months agoFirst attempt at getting the build to work with Tcl 9.0.
drh [Tue, 30 Jul 2024 15:49:02 +0000 (15:49 +0000)] 
First attempt at getting the build to work with Tcl 9.0.

FossilOrigin-Name: 6e5bb48a74d63fb8c30528f0005d1763cd2dbb882abf86baf1565721e6bfcf84

11 months agoFix documentation typo.
drh [Sat, 27 Jul 2024 20:28:13 +0000 (20:28 +0000)] 
Fix documentation typo.
[forum:/forumpost/993cb82402|Forum post 993cb82402]

FossilOrigin-Name: 86de4e755e37dc1cbcbd59018927aa87ff49fc15f706a36187631d8f14075c12

11 months agowasm minimal build: strip authorizers and JSON support (saves approx 35kb). Strip...
stephan [Wed, 24 Jul 2024 23:58:28 +0000 (23:58 +0000)] 
wasm minimal build: strip authorizers and JSON support (saves approx 35kb). Strip vtab support from the JS bits but cannot yet strip it from the C bits because that requires a custom-configured sqlite3.c.

FossilOrigin-Name: eb64d106551718467e0f6c6b53695410bf4c566901008e4cda8580d0f7efa7b0

11 months agoRestructuring of the wasm build to support an experimental 'minimal' build mode which...
stephan [Wed, 24 Jul 2024 22:07:18 +0000 (22:07 +0000)] 
Restructuring of the wasm build to support an experimental 'minimal' build mode which elides all non-core APIs.

FossilOrigin-Name: ee2191f7302210100fa0b29ace8156531ad995bf61aa2642e526e0901d0c6862

11 months agoAdd the percentile extension to the CLI by default.
drh [Wed, 24 Jul 2024 13:53:51 +0000 (13:53 +0000)] 
Add the percentile extension to the CLI by default.

FossilOrigin-Name: bcc31846964102385d5a21eb5e85d7db153b155e76b4e2847c9453d3d0e1af04

11 months agoAdd the percentile_cont(Y,P) variant of percentile() to the percentile
drh [Wed, 24 Jul 2024 13:41:09 +0000 (13:41 +0000)] 
Add the percentile_cont(Y,P) variant of percentile() to the percentile
extension.

FossilOrigin-Name: 095c22e62248f8ef50cd8531171827f50a7bdd4fc1128bf0e616a3eb2dce980e

11 months agoJNI SQLTester: fix --new command to force-replace db if it already exists. Add no...
stephan [Wed, 24 Jul 2024 12:12:11 +0000 (12:12 +0000)] 
JNI SQLTester: fix --new command to force-replace db if it already exists. Add no-op impls for --stmt-cache and --jsonglob commands.

FossilOrigin-Name: f1185dc349d076a6b8ea22f9b5cd527bfd60e9afd55eaec754c0e2b4d7edd5d4

11 months agoEnhance the percentile() extension function to include the median()
drh [Tue, 23 Jul 2024 16:23:46 +0000 (16:23 +0000)] 
Enhance the percentile() extension function to include the median()
variant.  Update the implementation to implement its own sorting
algorithm, so that the extension no longer depends on qsort().

FossilOrigin-Name: 6e31b1bab1f014933c671a12a5930c1e88d611cfe68d389e9ce888bd8842addd

11 months agoDoc typo fix. No code changes.
stephan [Mon, 22 Jul 2024 21:46:55 +0000 (21:46 +0000)] 
Doc typo fix. No code changes.

FossilOrigin-Name: 8d558ad25bfbdea04de87616d4e3f664b5749a7d23643d1a0238e991b4bb337e

11 months agoMove a block of JS code which was inadvertently (and harmlessly) moved in the previou...
stephan [Mon, 22 Jul 2024 21:21:25 +0000 (21:21 +0000)] 
Move a block of JS code which was inadvertently (and harmlessly) moved in the previous checkin. Clarify the semantics of an internal-use-only API. Add another WAL-related JS test.

FossilOrigin-Name: 6cd9f55a975b5237efee8776efce7e7836b41905ca750f82be3b90aa04c1dff2

11 months agoOPFS VFSes: remove the on-open() pragma calls, as those (A) already reflected the...
stephan [Mon, 22 Jul 2024 20:58:51 +0000 (20:58 +0000)] 
OPFS VFSes: remove the on-open() pragma calls, as those (A) already reflected the build-time default settings and (B) they made it illegal to run locking_mode=exclusive, which is a requirement for WAL mode without shared memory. Modify part of the test suite to demonstrate that the SAHPool VFS can run in WAL mode so long as locking_mode=exclusive is used.

FossilOrigin-Name: 19cd8e2b056d7842ee39afb7160c901c9dc55a5bac8049cb0b5246210f6b920d

11 months agowasm build: resolve a circular dep and do some minor tidying up.
stephan [Mon, 22 Jul 2024 19:52:02 +0000 (19:52 +0000)] 
wasm build: resolve a circular dep and do some minor tidying up.

FossilOrigin-Name: 9df3f1f24c6346dc94695bf533501c54379bb6e3cf492b67dda8a64a6a1eb495

11 months agoFixes to TreeView debugging output for VALUES clauses.
drh [Sun, 21 Jul 2024 23:34:52 +0000 (23:34 +0000)] 
Fixes to TreeView debugging output for VALUES clauses.

FossilOrigin-Name: b6aed8bcb06edc7f0221fd707d5adc227856fe62dbcaae5ffe1fb4faa5c542e1

11 months agoImproved debugging output when using PRAGMA vdbe_addoptrace:
drh [Sun, 21 Jul 2024 23:10:55 +0000 (23:10 +0000)] 
Improved debugging output when using PRAGMA vdbe_addoptrace:
Show the range of opcodes being checked for Column-to-Copy conversion.

FossilOrigin-Name: 2c122026db979a099a3d1a14ae1e01a0a64a559905ea414b2d80ed7dc3e04846

11 months agoFix an oversized allocation in sqlite3ExprCodeIN().
dan [Sat, 20 Jul 2024 16:11:12 +0000 (16:11 +0000)] 
Fix an oversized allocation in sqlite3ExprCodeIN().

FossilOrigin-Name: d7be326a80e7b3aa8fd6e5e059c04e6ad3feaffcb20b1e3c251d7195ddc1be8b

11 months agoMinor typo fixes in test-script-interpreter.md.
stephan [Thu, 18 Jul 2024 19:17:29 +0000 (19:17 +0000)] 
Minor typo fixes in test-script-interpreter.md.

FossilOrigin-Name: bf54b26092ded2e6acc779acfb960364f05c665c7626c38ffae61caae5636184

11 months agoFix a problem in FTS5 where it reports the wrong error code following an OOM.
drh [Thu, 18 Jul 2024 18:44:44 +0000 (18:44 +0000)] 
Fix a problem in FTS5 where it reports the wrong error code following an OOM.

FossilOrigin-Name: 0c1cc4071edcd3e465779bbb17ea3ee6ddaa7c93c4fde55e5f3e07aa4b45783b

11 months agoFixes for platforms with 32-bit pointers that require 64-bit values to be aligned.
dan [Wed, 17 Jul 2024 18:38:34 +0000 (18:38 +0000)] 
Fixes for platforms with 32-bit pointers that require 64-bit values to be aligned.

FossilOrigin-Name: 539e4f661767ef90aef8d995f1f75fd5f550703bba1517cd3caff84a4afe2b37

11 months agoAdd extra assert() statements to the fixes on this branch. alignment-fixes
dan [Wed, 17 Jul 2024 16:27:36 +0000 (16:27 +0000)] 
Add extra assert() statements to the fixes on this branch.

FossilOrigin-Name: 81b6360050eea95e4367de1b41b5864a640b4d1c5c8fc3bea3b96ed770cb0325

11 months agoSlight doc touchup for [af41a1e6fc8b36e9bf65] based on feedback. No code changes.
stephan [Mon, 15 Jul 2024 10:11:21 +0000 (10:11 +0000)] 
Slight doc touchup for [af41a1e6fc8b36e9bf65] based on feedback. No code changes.

FossilOrigin-Name: be7b1fc0c5d8cda971b471dfcb4637212bfff4f42b1e074077a381cc493d877a

11 months agoImprove one of the JS test cases.
stephan [Sat, 13 Jul 2024 18:16:40 +0000 (18:16 +0000)] 
Improve one of the JS test cases.

FossilOrigin-Name: 3767d8bef2dfa661b56c1bfaa4695e32ce26874154e4a322f0d599c257c6fc70

11 months agoFixes for platforms with 32-bit pointers that require 64-bit values to be aligned.
dan [Sat, 13 Jul 2024 16:53:56 +0000 (16:53 +0000)] 
Fixes for platforms with 32-bit pointers that require 64-bit values to be aligned.

FossilOrigin-Name: 2212d7488ed4ec2839ffa45cb9567056b36519434834634e4ecc441c330694d7

11 months agoAdd JS binding for sqlite3_column_decltype().
stephan [Sat, 13 Jul 2024 15:42:30 +0000 (15:42 +0000)] 
Add JS binding for sqlite3_column_decltype().

FossilOrigin-Name: 5252d292b14f6ed99b09f6330b19effd488c2b23ff6ea33311321a065d3f6ce2

11 months agoJS doc touchups. No code changes.
stephan [Sat, 13 Jul 2024 15:21:35 +0000 (15:21 +0000)] 
JS doc touchups. No code changes.

FossilOrigin-Name: a8e240495ff7e0cd38301ef2de215a7cc10fea832311bd19ca2592858ee4e6ff

11 months agoAdd JS bindings for sqlite3_stmt_busy() and sqlite3_stmt_explain().
stephan [Sat, 13 Jul 2024 14:07:47 +0000 (14:07 +0000)] 
Add JS bindings for sqlite3_stmt_busy() and sqlite3_stmt_explain().

FossilOrigin-Name: b772edfb44143107d4993bde600d0f4c45184f29a4deee403105c64748c36523

11 months agoAdd missing sqlite3_bind_parameter_name() binding to JS.
stephan [Sat, 13 Jul 2024 13:22:32 +0000 (13:22 +0000)] 
Add missing sqlite3_bind_parameter_name() binding to JS.

FossilOrigin-Name: 6dcfcc7e1c0772b11aec750bb75899a5c8e452735ecf5028c001fbaa7aa6fda0

11 months agoAdd JS bindings and tests for sqlite3_interrupted(), is_interrupted(), and db_readonly().
stephan [Sat, 13 Jul 2024 12:50:42 +0000 (12:50 +0000)] 
Add JS bindings and tests for sqlite3_interrupted(), is_interrupted(), and db_readonly().

FossilOrigin-Name: 5589ba5651d80479ae555429340fc74390ff07d3e05ba770bb7d82490211e00d

11 months agoRemove a stray/harmless duplicate wasm function export entry.
stephan [Sat, 13 Jul 2024 11:47:44 +0000 (11:47 +0000)] 
Remove a stray/harmless duplicate wasm function export entry.

FossilOrigin-Name: 5402e4fb1cbd7a2c3dee6ebfb492a076d05daa66f747d18602338874405829df

11 months agoAdd several convenience links to the OPFS VFS concurrency tester app for launching...
stephan [Sat, 13 Jul 2024 01:40:36 +0000 (01:40 +0000)] 
Add several convenience links to the OPFS VFS concurrency tester app for launching it with various combinations of options.

FossilOrigin-Name: 397d6a18f173a46b60a867fc45611045c76316d6602a3df8b4dc4ba45e1348ce

11 months agoAdd an option to the opfs-sahpool VFS which tells it to ignore a previous init failur...
stephan [Sat, 13 Jul 2024 01:02:57 +0000 (01:02 +0000)] 
Add an option to the opfs-sahpool VFS which tells it to ignore a previous init failure and retry, as an opt-in workaround for a browser quirk which occasionally denies OPFS access on the first attempt and permits it on subsequent attempts. This resolves [https://github.com/sqlite/sqlite-wasm/issues/79|issue #79 of the npm distribution].

FossilOrigin-Name: fbf3948a4ba27c6ebf55b24e7463b20026439f04d1974bafe78df5c5bc958f59

11 months agoRename the new opfs-sahpool init-retry flag to the suitably descriptive, and suitably... sahpool-reinit-fallback
stephan [Sat, 13 Jul 2024 00:55:55 +0000 (00:55 +0000)] 
Rename the new opfs-sahpool init-retry flag to the suitably descriptive, and suitably onerous, forceReinitIfPreviouslyFailed, based on feedback.

FossilOrigin-Name: c9f0a6090258534a3d81066df5610229183a8457fc60d5034b4b94d9a29796e4

11 months agosqldiff: fail if the 2nd db argument cannot be opened read-only.
stephan [Fri, 12 Jul 2024 14:41:16 +0000 (14:41 +0000)] 
sqldiff: fail if the 2nd db argument cannot be opened read-only.

FossilOrigin-Name: e8b33525fc2b4d609a7be9acc43fbc66638effaa7b092b48568ded6c53c4f4db

11 months agoWork around a difficult-to-trigger Atomics API message-passing quirk in the OPFS...
stephan [Fri, 12 Jul 2024 13:49:54 +0000 (13:49 +0000)] 
Work around a difficult-to-trigger Atomics API message-passing quirk in the OPFS VFS which appears in rare instances in some browsers when running high I/O loads. This resolves [https://github.com/sqlite/sqlite-wasm/issues/12 | issue #12 of the npm distribution].

FossilOrigin-Name: af41a1e6fc8b36e9bf65a5bb0154e1ce7eb99903cb5a3e4779322527c29d8780

11 months agosqldiff: if the first db argument does not exist, fail instead of creating an empty...
stephan [Fri, 12 Jul 2024 13:45:15 +0000 (13:45 +0000)] 
sqldiff: if the first db argument does not exist, fail instead of creating an empty db. Resolving that for the second argument is trickier, as discussed in [forum:ec2d429e32 | forum post ec2d429e32].

FossilOrigin-Name: 0547ccf776c6054732437bffb8b2fe2ed5194ef817c2593f8cec4a3e2b749720

11 months agoReformulate the forceReinitIfFailed handling based on feedback, to correct the type...
stephan [Thu, 11 Jul 2024 19:50:17 +0000 (19:50 +0000)] 
Reformulate the forceReinitIfFailed handling based on feedback, to correct the type-checking and resolve a potential race condition.

FossilOrigin-Name: c4f468309158f9b951137461213fb269d96d15c331256cf392a56c9bed231460

11 months agoRemove the timing and counter metrics from the OPFS VFS, as they're long-since unused... opfs-errant-op
stephan [Thu, 11 Jul 2024 14:07:46 +0000 (14:07 +0000)] 
Remove the timing and counter metrics from the OPFS VFS, as they're long-since unused so are just wasted CPU cycles.

FossilOrigin-Name: 67c035c34fb916e66bfe115a132660771e8fa2921e6d46756975c5df3ebcd73c

11 months agoAdd some docs explaining [64f4f3cd878b1a72].
stephan [Thu, 11 Jul 2024 12:57:58 +0000 (12:57 +0000)] 
Add some docs explaining [64f4f3cd878b1a72].

FossilOrigin-Name: 4fdf9a322fccf7d68b03d07a42a526f18f951e2e19228b7d41e01121b667cc86

11 months agoProposed workaround for the "errant op" case in the OPFS VFS, as discussed in [https...
stephan [Thu, 11 Jul 2024 12:36:28 +0000 (12:36 +0000)] 
Proposed workaround for the "errant op" case in the OPFS VFS, as discussed in [https://github.com/sqlite/sqlite-wasm/issues/12 | issue #12 of the npm distribution].

FossilOrigin-Name: 64f4f3cd878b1a723caa0cd54b21f10fdb27d4e2ecb19fc233cbc8dd9d06f259

11 months agoAdd an option to force the opfs-sahpool VFS init to re-run after it fails on a first...
stephan [Thu, 11 Jul 2024 11:04:17 +0000 (11:04 +0000)] 
Add an option to force the opfs-sahpool VFS init to re-run after it fails on a first attempt, as a workaround for flaky environments where initial access to OPFS sync access handles is rejected but then permitted on a second attempt. Reported and discussed in [https://github.com/sqlite/sqlite-wasm/issues/79|issue #79 of the npm distribution].

FossilOrigin-Name: 5286e0f654d91a4ebee51fcabaab696e17ff07bb18990b401a31bd3d1213e695

11 months agoRename some JS files for consistency. This affects only the build process, not the...
stephan [Wed, 10 Jul 2024 08:33:52 +0000 (08:33 +0000)] 
Rename some JS files for consistency. This affects only the build process, not the deliverables.

FossilOrigin-Name: bcef3f71a2f68768819d9f716f2c29e752fb173df1506469c8669d95ecc2ff50

11 months agoFix a use-after-free that could occur following an OOM introduced by [d8cedbe0].
dan [Mon, 8 Jul 2024 17:39:52 +0000 (17:39 +0000)] 
Fix a use-after-free that could occur following an OOM introduced by [d8cedbe0].

FossilOrigin-Name: 4fabfacfcf38e129949d3e4e2c3ffde3da3cd40d9d12c97ca29bc7c3604db6ed

11 months agoImprove the error message returned when fts5 finds a row is missing from its content...
dan [Mon, 8 Jul 2024 16:01:49 +0000 (16:01 +0000)] 
Improve the error message returned when fts5 finds a row is missing from its content table.

FossilOrigin-Name: 9b1afd4acb8cf9738154e921dcb074d895bbcc4742bf1016ef9f045a0da78bc8

12 months agoUse a mini Bloom filter to help reduce the number of pointless searches for
drh [Fri, 5 Jul 2024 13:55:59 +0000 (13:55 +0000)] 
Use a mini Bloom filter to help reduce the number of pointless searches for
prior SubrtnSig objects when generating code for IN operators with subqueries
as their right operand.

FossilOrigin-Name: d8cedbe055b40a0ea4e5d47845b535162e9fcb0d0f88c03211797ab64d2d56fb

12 months agoImproved reuse of subqueries associated with IN operators, especially when
drh [Fri, 5 Jul 2024 09:56:11 +0000 (09:56 +0000)] 
Improved reuse of subqueries associated with IN operators, especially when
the IN operator is duplicated due to predicate push-down.

FossilOrigin-Name: c9a3498113074bbcd9a8c8d30286fef6c6a49ad2c84b90ec0f5a148389d6245c

12 months agoSmall performance optimizations. reuse-subqueries
drh [Fri, 5 Jul 2024 01:05:34 +0000 (01:05 +0000)] 
Small performance optimizations.

FossilOrigin-Name: 99fd34b58a9b09af20f1f1a3c37137ae55159310c8af97806550eeee6adc4fc5

12 months agoAdd test cases to in7.test.
dan [Thu, 4 Jul 2024 18:56:26 +0000 (18:56 +0000)] 
Add test cases to in7.test.

FossilOrigin-Name: 07817efc10a6ab59dcb18ad218a3bb5a5d49a724c51296d5c8d7e386b0e0c789

12 months agoDisable the reuse of IN-clause subqueries if the subquery is an explicit
drh [Thu, 4 Jul 2024 18:26:41 +0000 (18:26 +0000)] 
Disable the reuse of IN-clause subqueries if the subquery is an explicit
"SELECT ALL".  The ALL keyword is almost never used in actual practice (most
developers don't even know it can be used) so this should not interfere with
the optimization, but it does give us a convenient way to turn it off for
testing purposes.

FossilOrigin-Name: a81299be2ce203dcc28e7d0ba24791cbfba80e1ee3e1564469a226cac8adb17d

12 months agoUpdate EXPLAIN output to include P4_SUBRTNSIG.
dan [Thu, 4 Jul 2024 17:49:34 +0000 (17:49 +0000)] 
Update EXPLAIN output to include P4_SUBRTNSIG.

FossilOrigin-Name: 61e56923c80d72d6467ec703b4946b251abf591649fa9e8e579667d7cbd25682

12 months agoBe more aggressive about reusing subqueries that appear on the RHS of IN
drh [Thu, 4 Jul 2024 16:57:11 +0000 (16:57 +0000)] 
Be more aggressive about reusing subqueries that appear on the RHS of IN
operators that have been replicated due to the predicate push-down optimization.

FossilOrigin-Name: 2accf32b6e45a396503c29eecc14a103bcc7b4c313cde921b26b489704060177

12 months agoAdd comment using the name "predicate push-down optimization" to what we have
drh [Thu, 4 Jul 2024 11:15:32 +0000 (11:15 +0000)] 
Add comment using the name "predicate push-down optimization" to what we have
also called "WHERE-clause push down".  No changes to code.

FossilOrigin-Name: be77fe701c7b7d3407800e1ed6a4c8be14035831790419cc99362bff41c65b60

12 months agoFor shell completion, use pragma_table_xinfo instead of pragma_table_info, so that...
stephan [Thu, 4 Jul 2024 09:45:23 +0000 (09:45 +0000)] 
For shell completion, use pragma_table_xinfo instead of pragma_table_info, so that generated columns are handled, as reported in [forum:f0735e05d8d7e857|forum post f0735e05d8d7e857].

FossilOrigin-Name: a204ffc06b468c2edf8f11ccf3de639edd4f8282e69a44ceeb68a4d3a43e77ea

12 months agoWhen constructing an ephermeral table to use as the right-hand side of
drh [Wed, 3 Jul 2024 20:19:33 +0000 (20:19 +0000)] 
When constructing an ephermeral table to use as the right-hand side of
an IN operator, also construct a Bloom filter to speed membership testing.

FossilOrigin-Name: baa83b460c677c210c7fa3f20314d7e05f305aed8a69026bc5fa106a3de4ea38

12 months agoShow the creation of IN-operator Bloom filters in the EXPLAIN QUERY PLAN output. in-bloom
drh [Wed, 3 Jul 2024 20:10:42 +0000 (20:10 +0000)] 
Show the creation of IN-operator Bloom filters in the EXPLAIN QUERY PLAN output.

FossilOrigin-Name: c10a1b99d47a4c93bdb16e646f6a21add570d6dbb34fd91a32f8abacdb28712b

12 months agoAdd a new sqlite3FaultSim() call to OP_NotFound to use for testing purposes.
drh [Wed, 3 Jul 2024 18:56:56 +0000 (18:56 +0000)] 
Add a new sqlite3FaultSim() call to OP_NotFound to use for testing purposes.

FossilOrigin-Name: 84fd275bfd8afada50d3a5ac491d2b866671f8f0d2496bd240cf4bfdd74e7399

12 months agoUse a Bloom filter to improve performance of IN operators when the RHS of
drh [Wed, 3 Jul 2024 17:51:48 +0000 (17:51 +0000)] 
Use a Bloom filter to improve performance of IN operators when the RHS of
the IN operator is a subquery.

FossilOrigin-Name: 1933496539c19cbf429a39d6b0b1c6b1b2af50733a3c4aea4920990ced652f6a

12 months agoAdd assert() statements to FTS5 to hush-up warnings from scan-build.
drh [Tue, 2 Jul 2024 13:54:46 +0000 (13:54 +0000)] 
Add assert() statements to FTS5 to hush-up warnings from scan-build.

FossilOrigin-Name: 77a76654e64c05f2c67be120f579fc60924ff51a9d0fa2cf9eb158f40171b5f5

12 months agoReword the deliberate_fall_through macro along the lines suggested by
drh [Tue, 2 Jul 2024 12:16:29 +0000 (12:16 +0000)] 
Reword the deliberate_fall_through macro along the lines suggested by
[forum:/forumpost/7ec11023dd|forum post 7ec11023dd] so that it works better
with LLVM, while preserving compatibility with MSVC and older GCCs.

FossilOrigin-Name: fc248a4a0a232a95a79e24e57faedb5d824c3bf0aa62054b72339257dc9c18b3

12 months agoIn the CLI, if the XDG_CONFIG_HOME environment variable is not set, then also
drh [Tue, 2 Jul 2024 11:30:10 +0000 (11:30 +0000)] 
In the CLI, if the XDG_CONFIG_HOME environment variable is not set, then also
search in ~/.config/sqlite3/sqliterc for the initialization file.
See [forum:/forumpost/5cc6d059e9e092ed|forum thread 5cc6d059e9e092ed].

FossilOrigin-Name: 33841c9c3cb57beeb3884d4b0715d26199926b7d3e4d3dd1ab6f5603b5a62591

12 months agoFix a typo in a comment in a test case. No changes to code.
drh [Sat, 29 Jun 2024 15:57:55 +0000 (15:57 +0000)] 
Fix a typo in a comment in a test case.  No changes to code.

FossilOrigin-Name: f501166de4f967b7e2e895f180308630e3c88b12bc51823a0a124ee5089eae4f

12 months agoAdd a NEVER() around a branch in sqlite3ExprAffinity() that is designed to
drh [Sat, 29 Jun 2024 12:22:32 +0000 (12:22 +0000)] 
Add a NEVER() around a branch in sqlite3ExprAffinity() that is designed to
prevent an infinite loop, but which can now never be reached due to recent
changes.

FossilOrigin-Name: da0b794852f8ccba5bd30395892044ec71b148075608406867785395e1f50b31

12 months agoUpdate fts5 comment/docs to include the order matches are visited in by the xPhraseFi...
dan [Fri, 28 Jun 2024 18:21:30 +0000 (18:21 +0000)] 
Update fts5 comment/docs to include the order matches are visited in by the xPhraseFirst/xPhraseNext API.

FossilOrigin-Name: e41930ef5b883c0f2a6b7eb9606021d14a3df145bc94cb0d508af22b4db7f168

12 months agoAdditional steps to make sure calls to sqlite3ExprToRegister() are sane.
drh [Fri, 28 Jun 2024 18:07:10 +0000 (18:07 +0000)] 
Additional steps to make sure calls to sqlite3ExprToRegister() are sane.

FossilOrigin-Name: 1c42d7176b228791f99bc9971d92a9ab67b1e2956ca4f8d934bd1a3e596d6c80

12 months agoDo not convert an expression node that is already TK_REGISTER into a
drh [Fri, 28 Jun 2024 17:14:00 +0000 (17:14 +0000)] 
Do not convert an expression node that is already TK_REGISTER into a
new TK_REGISTER.  This is a follow-up to [663f5dd32d9db832] that fixes a
bug discovered by dbsqlfuzz.

FossilOrigin-Name: fcb669cfaa8a59ca710504d5aaa1936f65a6da8ff13473ad84458f97a6fd1f49

12 months agoFix an incorrect tcl comment that appeared in many fts5 test files.
dan [Mon, 24 Jun 2024 18:06:15 +0000 (18:06 +0000)] 
Fix an incorrect tcl comment that appeared in many fts5 test files.

FossilOrigin-Name: d07085e2035b52a7edd27980523225e59c5bf851fb4a6de975f03e653b937c9c

12 months agoFix some problems with calling fts5 api functions from within non-full-text queries.
dan [Mon, 24 Jun 2024 16:08:01 +0000 (16:08 +0000)] 
Fix some problems with calling fts5 api functions from within non-full-text queries.

FossilOrigin-Name: 56d265f956fe6433b625c6d732e55f387af3f643e705316f5a6f709d63731669

12 months agoEnhance the output of ".scanstats vm" to include the absolute number of ticks for...
dan [Mon, 24 Jun 2024 14:53:14 +0000 (14:53 +0000)] 
Enhance the output of ".scanstats vm" to include the absolute number of ticks for each VM instruction, instead of just the percentage of the total.

FossilOrigin-Name: 1535828335d2b0eccebae952ed2bc70cc0cd893bd4b079d26b80deff9b5f752b

12 months agoRevert Lemon so that it only shows -D options that are actually used. Though
drh [Wed, 19 Jun 2024 18:54:04 +0000 (18:54 +0000)] 
Revert Lemon so that it only shows -D options that are actually used.  Though
the change to display the options in sorted order is retained.

FossilOrigin-Name: e54eb217c9508c19aee085b111a1323c9009f014ba4db6019918e27002c4ca8c

12 months agoIn lemon, show all the -D options in the generated header, even if none of them
drh [Wed, 19 Jun 2024 18:46:44 +0000 (18:46 +0000)] 
In lemon, show all the -D options in the generated header, even if none of them
are used.

FossilOrigin-Name: 2aa009c38bb207ac59b9bbd6f8e0d7315697b3fd6a01f9431f29a3c7ccad53e7

12 months agoEnhance lemon.c so that when it shows the compile-time options in the header
drh [Wed, 19 Jun 2024 16:38:17 +0000 (16:38 +0000)] 
Enhance lemon.c so that when it shows the compile-time options in the header
comment of the generated output file, it shows all options, even those not
used, and it shows them in sorted order.

FossilOrigin-Name: eed76e6698eabe47c6bf9696599ce1c2f7aa428cf60f39d0566fbd0d1f6c4c62

12 months agoRemove some extraneous flags from the fiddle-debug build. Internal doc tweaks in...
stephan [Wed, 19 Jun 2024 11:08:58 +0000 (11:08 +0000)] 
Remove some extraneous flags from the fiddle-debug build. Internal doc tweaks in the main wasm makefile.

FossilOrigin-Name: afae2c9e6fba0820c9be8d06a2e301a74167e4457bada45fe57b5fd9287d2e8b

12 months agoMinor cleanups in the new fiddle build code.
stephan [Tue, 18 Jun 2024 22:03:28 +0000 (22:03 +0000)] 
Minor cleanups in the new fiddle build code.

FossilOrigin-Name: d356aebdd450bedc1ecbbdd266effe53c7badbd74ed7e6db8d0c31318d99a35f

12 months agoRework the fiddle build to build separate debug and non-debug bundles, with the latte...
stephan [Tue, 18 Jun 2024 21:50:30 +0000 (21:50 +0000)] 
Rework the fiddle build to build separate debug and non-debug bundles, with the latter in ./fiddle-debug.

FossilOrigin-Name: a9f1758f1cbe7b7d0c87dfb060f52d03c6ea0e066c079891a8ff354073997f9e

12 months agoRemove an extraneous CSS file and import its CSS into the one HTML file which uses it.
stephan [Tue, 18 Jun 2024 20:47:05 +0000 (20:47 +0000)] 
Remove an extraneous CSS file and import its CSS into the one HTML file which uses it.

FossilOrigin-Name: 66085ca42388e8de741712150541a3e0afb06b3e23e738aa9ff687e9fc494c50

12 months agoAdd fiddle-debug make target to ext/wasm. It builds the same target files as a non...
stephan [Tue, 18 Jun 2024 20:40:11 +0000 (20:40 +0000)] 
Add fiddle-debug make target to ext/wasm. It builds the same target files as a non-debug build, as opposed to a new copy, but adds various debug-related flags.

FossilOrigin-Name: 993143c5c39fb6ee15b0661cec8fed436ff04543b528a3796534f5e3a44799f5

12 months agoAdd instructions for how to do debugging builds of the CLI on Windows.
drh [Tue, 18 Jun 2024 19:36:04 +0000 (19:36 +0000)] 
Add instructions for how to do debugging builds of the CLI on Windows.

FossilOrigin-Name: abe81c18614b41c78cf3edeaaf8d85d5d2dbdcf331b580f1c98f80d3726d8189