]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
18 hours agoPropagate the -ldl and -lpthread flags, if needed, into sqlite3.pc, per request in... branch-3.50
stephan [Fri, 4 Jul 2025 18:38:23 +0000 (18:38 +0000)] 
Propagate the -ldl and -lpthread flags, if needed, into sqlite3.pc, per request in [forum:44a58c807353162f | forum post 44a58c807353162f]. This resolves usage of that pkgconf file on some OSes.

FossilOrigin-Name: b4db6ddeed8e32e635f636afe3a4c7969e384d7cc0c14038f0c9eab2f4c9d97e

4 days agoIncrement the patch level to 3.
drh [Tue, 1 Jul 2025 12:56:17 +0000 (12:56 +0000)] 
Increment the patch level to 3.

FossilOrigin-Name: cf6d599ce96a89c0d0d01b30b743c970be2034c9a711db1ca3def42fbb02538f

4 days agoWhen attempting to optimize "expr AND false" to "false" and
drh [Tue, 1 Jul 2025 12:49:32 +0000 (12:49 +0000)] 
When attempting to optimize "expr AND false" to "false" and
"expr IN ()" to "false", take care not to delete aggregate functions
in the "expr" as doing so can change the meaning of the query.

FossilOrigin-Name: 355c7902de8da79f35f6d729d0fc5bdd74cdc1a1b249cf440ef74839ec025850

5 days agoMinor API doc typo fixes from brickviking.
stephan [Mon, 30 Jun 2025 11:01:42 +0000 (11:01 +0000)] 
Minor API doc typo fixes from brickviking.

FossilOrigin-Name: 581a088df726b3afbc87d819b7cf25d79ae01f3abf77207da8c3fc84481e534f

6 days agoMinor API doc typo fixes from brickviking.
stephan [Sun, 29 Jun 2025 07:32:57 +0000 (07:32 +0000)] 
Minor API doc typo fixes from brickviking.

FossilOrigin-Name: 45acc26bb01b24fbc9caaed4b27980173b8adb199c6ff8eeebb4425159f5dd45

6 days agoVersion 3.50.2 release version-3.50.2
drh [Sat, 28 Jun 2025 14:00:48 +0000 (14:00 +0000)] 
Version 3.50.2

FossilOrigin-Name: 2af157d77fb1304a74176eaee7fbc7c7e932d946bf25325e9c26c91db19e3079

7 days agoRaise an error right away if the number of aggregate terms in a query
drh [Fri, 27 Jun 2025 19:56:00 +0000 (19:56 +0000)] 
Raise an error right away if the number of aggregate terms in a query
exceeds the maximum number of columns.

FossilOrigin-Name: 4ae45291e6aac984af49c6da8e03216cf96b97b2ca7b11d5bcdb90b1f827fdaf

8 days agoAPI doc typo fixes and closing DD element tags from brickviking.
drh [Fri, 27 Jun 2025 12:51:40 +0000 (12:51 +0000)] 
API doc typo fixes and closing DD element tags from brickviking.

FossilOrigin-Name: 61135722473b72e9976e960fac70df6562574068203d2b10320cc59acb04e766

8 days agoMinor API doc fixes sent off-list from brickviking.
drh [Thu, 26 Jun 2025 15:41:43 +0000 (15:41 +0000)] 
Minor API doc fixes sent off-list from brickviking.

FossilOrigin-Name: a9e9cefd0520170a3cde271f3f49c919ff3d6307e17f0e2a4be5ca23c2cf4b05

2 weeks agoCherry-pick of documentation updates from trunk - no code changes.
drh [Thu, 19 Jun 2025 13:48:37 +0000 (13:48 +0000)] 
Cherry-pick of documentation updates from trunk - no code changes.

FossilOrigin-Name: c53906260ec80c51f1071346eaf505490250dcee0631ff173751030b9e332868

2 weeks agoAvoid writing frames with no checksums into the wal file if a
drh [Tue, 17 Jun 2025 19:32:23 +0000 (19:32 +0000)] 
Avoid writing frames with no checksums into the wal file if a
savepoint is rolled back after dirty pages have already been
spilled into the wal file.  Also fix a corner case in the previous
check-in on this branch.

FossilOrigin-Name: c232fa2bfc1a3f2c659a1d3bb26f98f2b39f20777eebd4d08e53c21d018d3b59

2 weeks agoFix an issue going back to version 3.39.0 with transitive IS constraints
drh [Mon, 16 Jun 2025 18:04:21 +0000 (18:04 +0000)] 
Fix an issue going back to version 3.39.0 with transitive IS constraints
in queries that make use of RIGHT JOIN.

FossilOrigin-Name: 6c5f4c8af90cfe2f1b06485f8cf61d7e6d4ad92f5209e84aa1c6d1a938780a64

3 weeks agoHave sqlite3_setlk_timeout() take the database handle mutex. This fixes an assert...
drh [Thu, 12 Jun 2025 13:27:10 +0000 (13:27 +0000)] 
Have sqlite3_setlk_timeout() take the database handle mutex. This fixes an assert() failure that could occur if sqlite3_setlk_timeout() were called on a threadsafe handle.

FossilOrigin-Name: 954efdd30da169e508f27ddf2f94bc2c3b6cc3f4fd13ffa650ab53d3e35df566

3 weeks agoHelp ext/wasm 'make snapshot' find the wasm docs dir when it's run from outside of...
stephan [Thu, 12 Jun 2025 10:56:16 +0000 (10:56 +0000)] 
Help ext/wasm 'make snapshot' find the wasm docs dir when it's run from outside of my usual checkout structure.

FossilOrigin-Name: 0e04136bc5a72b47b476258ac234364f677d7ee50e3f3710b23f3e2c6e163df5

3 weeks agoFix a problem with UPDATEs on fts5 tables that contain blob values.
drh [Wed, 11 Jun 2025 17:24:46 +0000 (17:24 +0000)] 
Fix a problem with UPDATEs on fts5 tables that contain blob values.

FossilOrigin-Name: 2b4577d83ca6a9f404300a719e1e0920dc40302d9cd9f30d1fc204b109e2726f

3 weeks agoIncrease the version number for this branch to 3.50.2.
drh [Wed, 11 Jun 2025 00:06:38 +0000 (00:06 +0000)] 
Increase the version number for this branch to 3.50.2.

FossilOrigin-Name: e9652e398ef2f6d5eed41a16231cf3af038c5c14433704fdcf1945c872659aaf

3 weeks agoFix the concat_ws() SQL function so that it includes empty strings in the
drh [Wed, 11 Jun 2025 00:05:27 +0000 (00:05 +0000)] 
Fix the concat_ws() SQL function so that it includes empty strings in the
concatenation.

FossilOrigin-Name: e0ce6dab46ba965e28413fee62f32589c4da29a789f93745b6055bf62ebf129e

3 weeks agoImproved selection of the divisor when subdividing nested Bitvec objects.
drh [Tue, 10 Jun 2025 20:06:29 +0000 (20:06 +0000)] 
Improved selection of the divisor when subdividing nested Bitvec objects.
This fixes a potential stack overflow that can occur when the database size
is within 60 pages of the maximum allowed by the file format.

FossilOrigin-Name: 5d40152bfed84675547bcfd3627e67c2023520fba63f078671780ece6ce736a5

3 weeks agoAdjustments to ext/misc/fileio.c in an attempt to get it to build using mingw.
drh [Tue, 10 Jun 2025 16:56:02 +0000 (16:56 +0000)] 
Adjustments to ext/misc/fileio.c in an attempt to get it to build using mingw.

FossilOrigin-Name: ac786b92e3e24e2f1c4f4093acc2c357da38b0e986f6e29fec858398c6ec04d9

4 weeks agoVersion 3.50.1 version-3.50.1
drh [Fri, 6 Jun 2025 14:52:32 +0000 (14:52 +0000)] 
Version 3.50.1

FossilOrigin-Name: b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95

4 weeks agoFix harmless compiler warning introduced by the setlk-snapshot-fix merge.
drh [Thu, 5 Jun 2025 13:14:46 +0000 (13:14 +0000)] 
Fix harmless compiler warning introduced by the setlk-snapshot-fix merge.

FossilOrigin-Name: cbab5d86517f0c57c6025aaddbb9408e29bccdc8b158d2b8d40bd2f3b333ef69

4 weeks agoFixes to ensure SQLITE_ENABLE_SETLK_TIMEOUT builds use a blocking lock
drh [Thu, 5 Jun 2025 11:57:20 +0000 (11:57 +0000)] 
Fixes to ensure SQLITE_ENABLE_SETLK_TIMEOUT builds use a blocking lock
and do not call xSleep() when (a) opening a snapshot transaction, and
(b) when blocked by another process running recovery.

FossilOrigin-Name: 8ac4525a2e3100bb5b9460cc49bb64f007911180d5f51461282b1de0201328b6

4 weeks agoMerge TEA README updates from [bf7be67e3f]. No code changes.
stephan [Thu, 5 Jun 2025 08:33:08 +0000 (08:33 +0000)] 
Merge TEA README updates from [bf7be67e3f]. No code changes.

FossilOrigin-Name: 65c5e66af77a233c6255cb9fca5887269bb38566d3c5482569b8697c72e355ae

4 weeks agotea build: add an info-exists check after a 'scan' call, as scan does not create...
stephan [Wed, 4 Jun 2025 18:40:03 +0000 (18:40 +0000)] 
tea build: add an info-exists check after a 'scan' call, as scan does not create its target vars on error. Problem reported at [forum:fde857fb8101a4be | forum post fde857fb8101a4be] and triggers when the 'vsatisfies' test for the host's Tcl version fails (so the build would fail anyway, but will fail more informatively with this fix).

FossilOrigin-Name: a7eb03e26345abb450f15f0e25eb843bee1320837d41d272ec1aada8b5bf7ab5

4 weeks agoApply the duplicate 'export default' workaround to the (untested and unsupported...
stephan [Tue, 3 Jun 2025 18:11:27 +0000 (18:11 +0000)] 
Apply the duplicate 'export default' workaround to the (untested and unsupported) node-specific build rules in mkwasmbuilds.c to resolve a problem reported off-list by Thomas Steiner.

FossilOrigin-Name: c8523d9e145ebdc74dc0516d4eed55e96f324166edcf0f65766de3a7622d561f

4 weeks agoRelax query flattener constraint (3b) and thereby allow flattening the RHS of
drh [Tue, 3 Jun 2025 17:46:24 +0000 (17:46 +0000)] 
Relax query flattener constraint (3b) and thereby allow flattening the RHS of
a LEFT JOIN even if the RHS contains a virtual table.  This is a performance
optimization that would not normally be found on a patch branch, but
downstream needs it and does not want to wait on the next full release.

FossilOrigin-Name: 916dde1f409d5cb9300da464daa1e06e6fcee3d8a6a68d469fa9580ae8700bfa

4 weeks agoFix an off-by-one error in sqlite3_rsync.
drh [Tue, 3 Jun 2025 10:30:31 +0000 (10:30 +0000)] 
Fix an off-by-one error in sqlite3_rsync.

FossilOrigin-Name: e13a9492c102d8ad756fc4b0b86d7008303a1fa7660c41b574add6e111ed9b0c

4 weeks agoFix JSONB edit so that when it is trying to reduce the size of an element
drh [Mon, 2 Jun 2025 23:41:56 +0000 (23:41 +0000)] 
Fix JSONB edit so that when it is trying to reduce the size of an element
it understands 0xf0 (8-byte) sizes.

FossilOrigin-Name: cee271122784bf88f576ce29ead2c54f2833e5326f24a4cce8efa4d4c8ec9f32

4 weeks agoImprove the accuracy of affinity and collating sequence analysis for
drh [Mon, 2 Jun 2025 18:42:49 +0000 (18:42 +0000)] 
Improve the accuracy of affinity and collating sequence analysis for
NATURAL JOINs to the left of RIGHT JOINs where source tables are views
or subqueries.

FossilOrigin-Name: d6a8b1ea5ca7e0d4e640144a4b3ada516486564bb5922af688328399c4cc4427

4 weeks agoUpdate the version number to 3.50.1
drh [Sun, 1 Jun 2025 21:55:17 +0000 (21:55 +0000)] 
Update the version number to 3.50.1

FossilOrigin-Name: 86f0e4eabe1010c00955edf19e6d7e251ca03c33dd6eed38460148473aea8e42

4 weeks agoFix an off-by-one error in the size computation of a vdbe-sorter.
drh [Sun, 1 Jun 2025 21:49:45 +0000 (21:49 +0000)] 
Fix an off-by-one error in the size computation of a vdbe-sorter.

FossilOrigin-Name: d5ab065727969c1b74c0f6cb2ef8d47f552e7071f790cf6fb43ac26248525086

4 weeks agoCherrypick obscure (fuzzer-generated) RIGHT JOIN bug fixes from trunk.
drh [Sat, 31 May 2025 18:46:44 +0000 (18:46 +0000)] 
Cherrypick obscure (fuzzer-generated) RIGHT JOIN bug fixes from trunk.

FossilOrigin-Name: a61da8169b4ac64c20b3f1dfe3bb2a57c5e6517828b0224bcde3ee93949733e1

5 weeks agoAdd "include <stddef.h>" to fts5 and rtree to ensure that they use the
drh [Fri, 30 May 2025 11:55:07 +0000 (11:55 +0000)] 
Add "include <stddef.h>" to fts5 and rtree to ensure that they use the
system version of the offsetof() macro when it is available, as the
built-in version triggers ubsan errors with clang.

FossilOrigin-Name: 6ceb1322ef10c1586a7ca97b377dce0c6e35d9abbdbff5a01e841a487eac08cb

5 weeks agoExtend the fix for ticket 623eff57e76d45f6]so that it covers RIGHT JOIN
drh [Fri, 30 May 2025 11:00:57 +0000 (11:00 +0000)] 
Extend the fix for ticket 623eff57e76d45f6]so that it covers RIGHT JOIN
in addition to LEFT JOIN.

FossilOrigin-Name: cbd9aabaa5f54434c7b744cc9bb439cc702e35d74397d7157f7f06bdf67d8b14

5 weeks agoSquelch an interesting but harmless struct initialization warning emitted after an...
stephan [Fri, 30 May 2025 10:18:47 +0000 (10:18 +0000)] 
Squelch an interesting but harmless struct initialization warning emitted after an emsdk update. Fix JS breakage introduced by changes in Emscripten 4.0.7: manually export the HEAPxyz symbols which used to be exposed by default.

FossilOrigin-Name: 042c6c6e9568f2ccd14b39812393e71481d04c42d768b4b56f71c02daad6b470

5 weeks agoFix the missing -lm link flag for the sqlite3 shell when building the autoconf bundle...
stephan [Thu, 29 May 2025 20:33:39 +0000 (20:33 +0000)] 
Fix the missing -lm link flag for the sqlite3 shell when building the autoconf bundle with --disable-static-shell, as reported in [forum:5adf1c932a | forum post 5adf1c932a].

FossilOrigin-Name: 80d5a9daa6b34b628d6b5ef8b852d0a29a71fda46dd797091d9cdd3342037a9c

5 weeks agoVersion 3.50.0 major-release version-3.50.0
drh [Thu, 29 May 2025 14:26:00 +0000 (14:26 +0000)] 
Version 3.50.0

FossilOrigin-Name: dfc790f998f450d9c35e3ba1c8c89c17466cb559f87b0239e4aab9d34e28f742

5 weeks agoDo not use a partial index unless the WHERE clause uses one or more columns
drh [Wed, 28 May 2025 16:56:23 +0000 (16:56 +0000)] 
Do not use a partial index unless the WHERE clause uses one or more columns
from the table being indexed.  This resolves the issue reported by
[forum:/forumpost/a8704b30f3|forum post 2025-05-28T13:03:40Z]. Test cases
are in TH3.

FossilOrigin-Name: f037ca064daeb81cb386da2a372d8e2d2dce55a3a13bc7bea4968ca51bf2843a

5 weeks agoDo not use a partial index if the truth of the WHERE clause does not depend silly-partial-indexes
drh [Wed, 28 May 2025 14:59:42 +0000 (14:59 +0000)] 
Do not use a partial index if the truth of the WHERE clause does not depend
on at least one column from the table being indexed.

FossilOrigin-Name: cbe2a392e45d40778570656d2ef2db43e58ad6453bd9d4b936fecfd963e22736

5 weeks agoSlight change to tool/split-sqlite3c.tcl to make it compatible with jimsh
drh [Mon, 26 May 2025 23:20:23 +0000 (23:20 +0000)] 
Slight change to tool/split-sqlite3c.tcl to make it compatible with jimsh

FossilOrigin-Name: fe670ddda933007386eb10facf4048ee88671f74b1fd41dfc3120beb717b8c9e

5 weeks agoFix a bug in the speedtest.tcl testing script that was introduced by
drh [Mon, 26 May 2025 17:29:13 +0000 (17:29 +0000)] 
Fix a bug in the speedtest.tcl testing script that was introduced by
[7e9845433ff26bdc]

FossilOrigin-Name: e4ffa86aa6ca82a42933281f6cbfca7bad702797eb8d6e684a1992e68dc1cfb7

5 weeks agoIn the TEA build, enable USE_TCL_STUBS on Mac platforms.
stephan [Mon, 26 May 2025 16:59:49 +0000 (16:59 +0000)] 
In the TEA build, enable USE_TCL_STUBS on Mac platforms.

FossilOrigin-Name: 0b5415151c9bf558378f83b1a60df3d3760f1aa311895af04e1fb79a8fb29e79

5 weeks agoOn OpenBSD, do not test fuzzcheck with ubsan as part of "make devtest".
dan [Mon, 26 May 2025 16:17:06 +0000 (16:17 +0000)] 
On OpenBSD, do not test fuzzcheck with ubsan as part of "make devtest".

FossilOrigin-Name: a3dabd599c3d3143b67258b307d352968e5f5d4ea0456940d16ae678de8c95eb

5 weeks agoAvoid calls to sprintf() in Lemon, since OpenBSD hates sprintf().
drh [Mon, 26 May 2025 15:36:43 +0000 (15:36 +0000)] 
Avoid calls to sprintf() in Lemon, since OpenBSD hates sprintf().

FossilOrigin-Name: ed17858ddf833b6b9c2164f31ee9138a998d28ec1564d09e20deb102eefedbc8

5 weeks agoWhen detecting TCLLIBDIR, skip over //zipfs paths, as the (file isdirectory) command...
stephan [Mon, 26 May 2025 15:20:57 +0000 (15:20 +0000)] 
When detecting TCLLIBDIR, skip over //zipfs paths, as the (file isdirectory) command will actually return true for those, but they're useless for installation purposes. This resolves the tea build's inability to install on stock openbsd.

FossilOrigin-Name: 5b29724a3287c9a910f303faf056d0706b66c3e6ba23f9746c11d775c631f374

5 weeks agotclsqlite.c doc typo fix.
stephan [Mon, 26 May 2025 07:15:20 +0000 (07:15 +0000)] 
tclsqlite.c doc typo fix.

FossilOrigin-Name: de0dfac1e5ca9d2661674c20664095386f60c77378311507fcba08111df52b38

5 weeks agoChange json_group_object() so that it ignores entries where the label
drh [Sat, 24 May 2025 20:20:20 +0000 (20:20 +0000)] 
Change json_group_object() so that it ignores entries where the label
is NULL.  [forum:/forumpost/e5bd251fb5|Forum post e5bd251fb5].

FossilOrigin-Name: 28215d131cd970a2756338579fb6b6091ab155be8f419505cae8ac918956165c

5 weeks agovtablog.c doc fixes reported in [forum:416d1e37b2|forum post 416d1e37b2].
stephan [Sat, 24 May 2025 16:01:50 +0000 (16:01 +0000)] 
vtablog.c doc fixes reported in [forum:416d1e37b2|forum post 416d1e37b2].

FossilOrigin-Name: 5d25f62bcd2d754134f608162778b49b0e71c29bd5a6f2461a07caca3d76c7de

6 weeks agoAmend the previous: Set SQLITE_JSON_MAX_DEPTH to 500 on *all* builds
drh [Sat, 24 May 2025 01:34:41 +0000 (01:34 +0000)] 
Amend the previous:  Set SQLITE_JSON_MAX_DEPTH to 500 on *all* builds
of fuzzcheck.

FossilOrigin-Name: c266e38c5b61f47b920027aad418b641ab32cb8a3360dbcfd9f9f29b14fd5375

6 weeks agoLimit JSON recursion depth to 500 when running ASAN in fuzzcheck, to prevent
drh [Fri, 23 May 2025 20:50:49 +0000 (20:50 +0000)] 
Limit JSON recursion depth to 500 when running ASAN in fuzzcheck, to prevent
stack overflow on ARM64.

FossilOrigin-Name: 5e96e177a040b46aa55492037ce5dc71ab49d66b45659d739f2ee6c3042f16ef

6 weeks agoAdd the --osmalloc option to the test/speedtest.tcl testing script.
drh [Fri, 23 May 2025 14:52:23 +0000 (14:52 +0000)] 
Add the --osmalloc option to the test/speedtest.tcl testing script.
Adjust ./configure so that it does not check for malloc_usable_size().

FossilOrigin-Name: 7e9845433ff26bdc5fe8654281d584394b77e3b206d09669b4468e0271c6eb37

6 weeks agoFix a problem with using streaming iterators with sqlite3changegroup_add_change().
dan [Thu, 22 May 2025 18:04:48 +0000 (18:04 +0000)] 
Fix a problem with using streaming iterators with sqlite3changegroup_add_change().

FossilOrigin-Name: 3dbde727146d28c316df47c7b5116be7f2476a0a0c893207c2a4ca3ab285cb5e

6 weeks agoClarify some malloc size computations to simplify the proof that they
drh [Mon, 19 May 2025 14:50:36 +0000 (14:50 +0000)] 
Clarify some malloc size computations to simplify the proof that they
are safe.  Remove some code associated with cygwin that is marked "#if 0".

FossilOrigin-Name: ba8184d132a935aa1980fbfb61ff308b93d433d559db4968f9014f7653ac9c6e

6 weeks agoMake the new sqlite3_setlk_timeout() interface accessible to loadable
drh [Mon, 19 May 2025 14:04:48 +0000 (14:04 +0000)] 
Make the new sqlite3_setlk_timeout() interface accessible to loadable
extensions.

FossilOrigin-Name: 8819b7285b71932327f47d29fa575cfb338e2fccd3f7c2023faf0575bfdb0079

6 weeks agoRemove stray tab characters from source files.
drh [Mon, 19 May 2025 12:46:08 +0000 (12:46 +0000)] 
Remove stray tab characters from source files.

FossilOrigin-Name: 298ff5a1dc5dbccaf6acd91731044f478a5ce522745332801708ceee996b01e6

6 weeks agoFix a harmless comment typo
drh [Mon, 19 May 2025 12:34:11 +0000 (12:34 +0000)] 
Fix a harmless comment typo

FossilOrigin-Name: c4d25acec3c1e28e5a4664a74c263cc0d00e118a6db4b26b51cb0d42d0f2b26f

6 weeks agoAdjust the tool/warnings.sh script so that it works on the latest versions
drh [Mon, 19 May 2025 11:08:30 +0000 (11:08 +0000)] 
Adjust the tool/warnings.sh script so that it works on the latest versions
of clang on Mac.

FossilOrigin-Name: 05a3dd9a179193d00968329152c8ffe6532f0cbdad7d19b47af32aebc0cd0d9e

7 weeks agoLatest teaish pieces, most significantly for tcl portability fixes. Move autoconf...
stephan [Sat, 17 May 2025 11:06:02 +0000 (11:06 +0000)] 
Latest teaish pieces, most significantly for tcl portability fixes. Move autoconf/teaish/autosetup/... to autosetup/teaish/. to simplify maintenance and deployment via the autoconf bundle.

FossilOrigin-Name: 381d3e82e831bedee56108fb585880d802c4d7d50b0804d909a33ff15a3be185

7 weeks agoMinor tcl doc update. tea-cleanups
stephan [Sat, 17 May 2025 10:35:11 +0000 (10:35 +0000)] 
Minor tcl doc update.

FossilOrigin-Name: 43259e8c3fab13b4597cdd1c670df00ec756a6fefdeb7d4ba2e0644e4ad47113

7 weeks agoRename feature-tests.tcl to feature.tcl. Haiku tcl portability fixes.
stephan [Sat, 17 May 2025 10:32:48 +0000 (10:32 +0000)] 
Rename feature-tests.tcl to feature.tcl. Haiku tcl portability fixes.

FossilOrigin-Name: 15bd9e581a6d6ebe281b091adc04dca4d1c7fa9bbb582bcbab8c401b4f976753

7 weeks agoLatest upstream teaish pieces for minor fixes. Restructure this copy of teaish to...
stephan [Sat, 17 May 2025 07:02:06 +0000 (07:02 +0000)] 
Latest upstream teaish pieces for minor fixes. Restructure this copy of teaish to simplify maintenance and the autoconf bundle build.

FossilOrigin-Name: 2b8d9b75ec5fe96cb5d06a3464fd4eb9a53018b7b548fedcd6cdbc46cdb55bdc

7 weeks agoImproved version of the previous check-in.
drh [Fri, 16 May 2025 18:19:11 +0000 (18:19 +0000)] 
Improved version of the previous check-in.

FossilOrigin-Name: 036c97e36cb36a2ac765a8e8539433dcb63f69155d4c24857f84faa44eed6eb5

7 weeks agoFix the optimization of check-in [663f5dd32d9db832] that strives to avoid
drh [Fri, 16 May 2025 17:30:20 +0000 (17:30 +0000)] 
Fix the optimization of check-in [663f5dd32d9db832] that strives to avoid
duplicate compuations in the GROUP BY clause so that it works even if the
GROUP BY term is a subquery on the RHS of a LEFT JOIN.  Problem found
by dbsqlfuzz.  Test cases in TH3.

FossilOrigin-Name: 955a026996b93e530ca5b566689cc646b31d3b9b5a5837897a58452d70f6d942

7 weeks agoAdd the --enablefk option to the "changeset apply" command of the
drh [Thu, 15 May 2025 18:50:19 +0000 (18:50 +0000)] 
Add the --enablefk option to the "changeset apply" command of the
changeset program.

FossilOrigin-Name: e98d46d436f8d251ae0da5ee85fd856aca3b57cd48d1be31fa6ca88fe72cad00

7 weeks agoEnhance the "changeset" utility program with new command-line options for
drh [Thu, 15 May 2025 17:33:32 +0000 (17:33 +0000)] 
Enhance the "changeset" utility program with new command-line options for
the "changeset apply" command.

FossilOrigin-Name: 428daca4f1b3e1a33b7e2f5acf114fa6136d46555e9947e2e88ea107bfec5e4f

7 weeks agoRework the showHelp() function in the CLI implementation so that its
drh [Thu, 15 May 2025 11:20:54 +0000 (11:20 +0000)] 
Rework the showHelp() function in the CLI implementation so that its
purpose and operation are well described by the header commit.  Omit
the use of enums that cause issues for MSVC 2025.

FossilOrigin-Name: 336ceeccc6f85bd78f4a26648af7edf9056d569a767b4120f125a02b2090a349

7 weeks agoBack out the "low-quality index" query planner hack of check-in
drh [Wed, 14 May 2025 16:40:05 +0000 (16:40 +0000)] 
Back out the "low-quality index" query planner hack of check-in
[bcac937526d9a6ef].  Subsequent query planner enhancements for dealing
with star-queries make that change unnecessary and the change was recently
found to cause a performance regression in an unrelated query.
Also fix a typo in a debugging message.

FossilOrigin-Name: e7dcf25efae364b7cdf9eb8265803c816c8b8557e4a7684da428badc6ffb3875

7 weeks agoFix trunk fork.
drh [Tue, 13 May 2025 19:06:11 +0000 (19:06 +0000)] 
Fix trunk fork.

FossilOrigin-Name: 53644c42c5ee40e905a72bb014515e5e30265577d543eeca09139800822b5b42

7 weeks agoAdjust the strftime() test in test/date4.test to remove flags not supported in musl...
stephan [Tue, 13 May 2025 18:58:56 +0000 (18:58 +0000)] 
Adjust the strftime() test in test/date4.test to remove flags not supported in musl libc if that environment is detected.

FossilOrigin-Name: fc254c1eb784c79a371bf961945a18a680982cdcd3fdcd7e6bb481712fe21cf8

7 weeks agoFirst cut at enhancing the fsdir virtual table so that it works with
drh [Tue, 13 May 2025 16:58:36 +0000 (16:58 +0000)] 
First cut at enhancing the fsdir virtual table so that it works with
unicode characters on Windows.

FossilOrigin-Name: c9e04dadfdf6c860631ce5603693add565ff2033aa25af5736302af7045fc91e

7 weeks agoOmit the unused readdir_r() routine from test_windirent.c
drh [Tue, 13 May 2025 15:09:13 +0000 (15:09 +0000)] 
Omit the unused readdir_r() routine from test_windirent.c

FossilOrigin-Name: f9a216e3ad1b3bc9be350aad5ef3dc8b3534d3ee67d160bfedda81a61295320c

7 weeks agoSession extension doc typo fix reported in [forum:75e9408acb|forum post 75e9408acb].
stephan [Mon, 12 May 2025 19:12:50 +0000 (19:12 +0000)] 
Session extension doc typo fix reported in [forum:75e9408acb|forum post 75e9408acb].

FossilOrigin-Name: b96cfff52b4f364388f168198e999ae2407c4afbc7b020f8bb350ab103ffb55c

7 weeks agoFix a coding mistake in vfstrace.
drh [Mon, 12 May 2025 11:48:39 +0000 (11:48 +0000)] 
Fix a coding mistake in vfstrace.

FossilOrigin-Name: f0054cc0bce4ed735796da1ea68b7773a582042bdd60fdae4e1af4c592104d15

7 weeks agoRemove a redundant typedef from the sqlite3_rsync.c source file.
drh [Sun, 11 May 2025 10:48:10 +0000 (10:48 +0000)] 
Remove a redundant typedef from the sqlite3_rsync.c source file.

FossilOrigin-Name: b4c37c6bcc644e21a29955e31151ea22a07627e524ce913afd3d2d6eeb7e0bb6

7 weeks agoProvide the SQLITE_BUG_COMPATIBLE_20250510 compile-time option that restores
drh [Sat, 10 May 2025 17:09:53 +0000 (17:09 +0000)] 
Provide the SQLITE_BUG_COMPATIBLE_20250510 compile-time option that restores
the JSON5 bug fixed in the previous check-in, in case some applications need
it for legacy compatibility.

FossilOrigin-Name: 491cf31904fdbc9567b838d1ba27901e75f8ea3a117043017d08354bb09f9711

7 weeks agoAdd enforcement of the obscure JSON5 syntax rule that the \0 escape
drh [Sat, 10 May 2025 15:53:17 +0000 (15:53 +0000)] 
Add enforcement of the obscure JSON5 syntax rule that the \0 escape
sequence must not be followed by a digit.
[forum:/forumpost/c061e87faf7d1c55|Forum post c061e87faf].

FossilOrigin-Name: 83c7477f2b9b0d6cb54cf6b14bf3c8ef4807e4bddc7986d275cf6717da8606b7

8 weeks agoFix PRAGMA trusted_schema=OFF and similar so that it restricts the kinds
drh [Thu, 8 May 2025 16:18:18 +0000 (16:18 +0000)] 
Fix PRAGMA trusted_schema=OFF and similar so that it restricts the kinds
of functions in CHECK constraints that the documentation says it does.  It
was letting through some function that it ought not have.  This is a
defect in [5720924cb07766cd].  See
[forum:/forumpost/3fa9d44c0b381342|forum thread 2025-05-08T08:50Z].
Additional test cases will be added separately.

FossilOrigin-Name: 25920beebf71ebc9a1bb9f56932280c9e03390f26fe9da2258f950979b238ce6

8 weeks agoInternal doc typo fix. No code changes.
stephan [Thu, 8 May 2025 13:51:55 +0000 (13:51 +0000)] 
Internal doc typo fix. No code changes.

FossilOrigin-Name: ac2aa39f7e3ae7ac921fac6566186939a1282f80ced5b3e3d5006a77ecf583ff

8 weeks agoFix a harmless warning about and oversize shift operation on malformed JSONB
drh [Wed, 7 May 2025 17:13:30 +0000 (17:13 +0000)] 
Fix a harmless warning about and oversize shift operation on malformed JSONB
inputs.  [https://issues.oss-fuzz.com/issues/415850463|OSSFuzz 415850463].

FossilOrigin-Name: cf8b55b3b6f0b73158e21731a206d5a8d8d9892989d91171a11c6dbbee34b338

8 weeks agoAdd test cases for the NOT NULL/IS NULL optimization in CHECK constraints fix.
dan [Tue, 6 May 2025 17:56:32 +0000 (17:56 +0000)] 
Add test cases for the NOT NULL/IS NULL optimization in CHECK constraints fix.

FossilOrigin-Name: 6eb2939a6093c0796910645172d80c53055559dd57c012f1dc815d89fbf84447

8 weeks agoFix a bug in the NOT NULL/IS NULL optimization of check-in [cb94350185f555c3]
drh [Tue, 6 May 2025 17:53:27 +0000 (17:53 +0000)] 
Fix a bug in the NOT NULL/IS NULL optimization of check-in [cb94350185f555c3]
that can cause invalid data to be used for a column if that column has a
CHECK constraint that includes the NOT NULL or IS NULL operator.
Problem discovered by the
[https://issues.chromium.org/issues/415397143|Chromium fuzzer].  Never
seen in the wild, as far as anybody knows.

FossilOrigin-Name: 2adaee9aa90f280a406007695fbc4a314806584c93d6b62b46c031492b31ec27

8 weeks agoFix the sqlite3VdbeTypeofColumn() function so that it works correctly
drh [Tue, 6 May 2025 16:28:44 +0000 (16:28 +0000)] 
Fix the sqlite3VdbeTypeofColumn() function so that it works correctly
even when SQLITE_DEBUG is defined.

FossilOrigin-Name: 1d5021533ed688d7a815ce75b338c72f577c14554027f88a21419935a9e68239

8 weeks agoFix console-I/O on Windows for DEBUG=3 builds. Broken by
drh [Tue, 6 May 2025 15:39:39 +0000 (15:39 +0000)] 
Fix console-I/O on Windows for DEBUG=3 builds.  Broken by
[925e97e6f4238f02].

FossilOrigin-Name: ccef4f7058928943be9204b2e53baaf791021e78e538396ba9f2a1d76323e8cf

2 months agoEnhance sqlite3_rsync so that if the first attempt to invoke a copy
drh [Sat, 3 May 2025 15:17:21 +0000 (15:17 +0000)] 
Enhance sqlite3_rsync so that if the first attempt to invoke a copy
of itself on the remote system using ssh fails, try again after
augmenting the PATH.  This enables sqlite3_rsync to work without the
--exe option when the remote system is a Mac.

FossilOrigin-Name: 38d4c94d8c7802101ef3bfb411002f9497fdbbbd2b4d3514cef5b76ffd66f75b

2 months agoFix a harmless redundant variable declaration in sqlite3_rsync.
drh [Sat, 3 May 2025 10:55:47 +0000 (10:55 +0000)] 
Fix a harmless redundant variable declaration in sqlite3_rsync.

FossilOrigin-Name: f8f15eff6ae50d569ed13a3b18f33eaa43453c0cb80b6007df38e880b62f45d0

2 months agoAddition summary results output when using -vvv on sqlite3_rsync.
drh [Sat, 3 May 2025 10:49:39 +0000 (10:49 +0000)] 
Addition summary results output when using -vvv on sqlite3_rsync.

FossilOrigin-Name: c702999cfac37fdcae64d261408e58d1f49fee65434fe346db6a2a6c7f8ac54e

2 months agoPromote the --protocol option to sqlite3_rsync from being an undocumented
drh [Sat, 3 May 2025 10:35:32 +0000 (10:35 +0000)] 
Promote the --protocol option to sqlite3_rsync from being an undocumented
debug option to being a supported and user-visible option.  This is
sometimes needed to work around bugs in prior versions running on the
remote.

FossilOrigin-Name: 4855e04e44e8fce2d6e37dd468eb6e9f4565c36cbc964156e65ac0449d7c212f

2 months agoEnhance sqlite3_rsync (in a backwards-compatible way) so that it has the
drh [Sat, 3 May 2025 08:17:46 +0000 (08:17 +0000)] 
Enhance sqlite3_rsync (in a backwards-compatible way) so that it has the
ability to send hashes for blocks of pages in addition to individual pages.
By judicious use of this capability, network bandwidth requirement to sync two
similar databases is reduced.

FossilOrigin-Name: e5d87aaa8fe1e8c8cb63813d26851183e77809a3d36e4c16c37f88b4b4724d6d

2 months agoImprovements to protocol negotiation. faster-rsync
drh [Sat, 3 May 2025 07:00:51 +0000 (07:00 +0000)] 
Improvements to protocol negotiation.

FossilOrigin-Name: 4f5a06e42010c3e047429f736ffb8e2e89a1eb599277c176945b57710f6713ca

2 months agoClean up command-line parsing. Add the undocumented
drh [Fri, 2 May 2025 23:50:30 +0000 (23:50 +0000)] 
Clean up command-line parsing.  Add the undocumented
-protocol option for debugging.

FossilOrigin-Name: 2a52b174e6e91cd7cfca0b20b39cdd231f377c7bc073f4223574556b94b16aa5

2 months agoNow appears to be working. More testing needed. Refinement of the
drh [Fri, 2 May 2025 22:25:40 +0000 (22:25 +0000)] 
Now appears to be working.  More testing needed.  Refinement of the
version-2 algorithm needed.

FossilOrigin-Name: cb035181d9fb5909696b8ec8f9c3eeb7a7dfb4b50e82e1d3f2d5ad150afcc0ff

2 months agoBug fixes. Added new debugging features to better visualize the
drh [Fri, 2 May 2025 18:32:46 +0000 (18:32 +0000)] 
Bug fixes.  Added new debugging features to better visualize the
protocol.

FossilOrigin-Name: c70330668690e7c3c55ae34137d5b2c91871432004b82b2b23a89fc3f1322a62

2 months agoThis is the start of an experiment in getting sqlite3_rsync to use less
drh [Fri, 2 May 2025 17:39:21 +0000 (17:39 +0000)] 
This is the start of an experiment in getting sqlite3_rsync to use less
bandwidth when the two databases are very similar, by sending hashes
over blocks of pages initially, rather than over individual pages, then
requesting more detail when hashes do not match.

FossilOrigin-Name: 266b4b8f0104bd4b1cff87ed78b0223006bf661a9650294a2b330d50c7ee8a0c

2 months agoDo not allow sqlite3_rsync to convert the replica from WAL-mode into
drh [Fri, 2 May 2025 11:18:09 +0000 (11:18 +0000)] 
Do not allow sqlite3_rsync to convert the replica from WAL-mode into
DELETE-mode, as that can disrupt existing clients on the replica side.
DELETE-mode to WAL-mode conversions are allowed, however.  See
[forum:/forumpost/6b575b66156673ee|forum thread 6b575b66156].

FossilOrigin-Name: 660a035b6ce6684d429b882133e032181cc1664f4efadf1bc0e4ae27d45071c4

2 months agoEnhance sqlite3_rsync so that, by default, it will sync non-WAL-mode
drh [Thu, 1 May 2025 18:07:27 +0000 (18:07 +0000)] 
Enhance sqlite3_rsync so that, by default, it will sync non-WAL-mode
database files.  Add a new command-line option --wal-only that restricts
the sync to WAL-mode databases only (the former default).  Improve
command-line option parsing so that only a single "-" is required before
each option.

FossilOrigin-Name: 4b53603fe468c0c28b818762917e41bdd870de6d4cc143688f1cdea3136c81a4

2 months agoAllow sqlite3_rsync to work on non-WAL-mode databases, as long as the rsync-non-wal-mode
drh [Thu, 1 May 2025 16:07:52 +0000 (16:07 +0000)] 
Allow sqlite3_rsync to work on non-WAL-mode databases, as long as the
--wal-only flag is not used.

FossilOrigin-Name: e4126dcd1eba4f040a7c07102d34692287b74b41a3437a3b9d15c4f8c9d4e6fd

2 months agoFix a harmless problem in the CLI in which SQL errors that occur during
drh [Wed, 30 Apr 2025 14:37:00 +0000 (14:37 +0000)] 
Fix a harmless problem in the CLI in which SQL errors that occur during
the ".schema" command are properly ignored, yes still appear in the ".log"
output. [forum:/forumpost/42fe6520b803be51|Forum post 42fe6520b8]

FossilOrigin-Name: 20abf1ec107f942e4527901685d61283c9c2fe7bcefad63dbf5c6cbf050da849

2 months agoFix an issue in Bloom filters on RHS subsqueries to IN operators.
drh [Wed, 30 Apr 2025 12:48:20 +0000 (12:48 +0000)] 
Fix an issue in Bloom filters on RHS subsqueries to IN operators.
See [forum:/forumpost/792a09cb3df9e69f|forum post 792a09cb3d] for
a description of the problem.  Also improve comments related
to [baa83b460c677c21] which was origin of the problem.

FossilOrigin-Name: cdef486e212fe4b26605065d9cff08f608cb80df48ee64e4be63637769bdfacc

2 months agoUpstream teaish for a tcl portability fix on Haiku and a much nicer impl of proj...
stephan [Tue, 29 Apr 2025 17:30:51 +0000 (17:30 +0000)] 
Upstream teaish for a tcl portability fix on Haiku and a much nicer impl of proj-tclConfig-sh-to-autosetup.

FossilOrigin-Name: ca0d30a43b3dfb95dd6b491f592031a053b0b5e95361ffe01ec8bd56d5e2d110

2 months agoRemove the run-fuzzcheck makefile targets, since testrunner now
drh [Tue, 29 Apr 2025 16:30:58 +0000 (16:30 +0000)] 
Remove the run-fuzzcheck makefile targets, since testrunner now
accomplishes that for us, and does a better job of it.

FossilOrigin-Name: 3ffd867ed31cd0779aa92b5e8b71592a8e7224977f9da8e5d6793a78bbb80070