]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 weeks agoGeneralize the indexCellCompare() so that works on any index page, not just flex-search
drh [Sat, 14 Jun 2025 18:02:12 +0000 (18:02 +0000)] 
Generalize the indexCellCompare() so that works on any index page, not just
the current page that a cursor is pointing to.

FossilOrigin-Name: eda518028f60efc7f879b8c10c900b4b1d4861b62f69a076051e98e61e5b1fee

2 weeks agoFix issues with expression indexes for flex-search queries.
drh [Sat, 14 Jun 2025 14:46:39 +0000 (14:46 +0000)] 
Fix issues with expression indexes for flex-search queries.

FossilOrigin-Name: 711608e49b0ec2ed885f8b3d0d770ec0590841fc4aaf2c331e4627c64ad7d069

2 weeks agoAdd the ability to disable the Flex-Search optimization using
drh [Sat, 14 Jun 2025 13:18:58 +0000 (13:18 +0000)] 
Add the ability to disable the Flex-Search optimization using
SQLITE_TESTCTRL_OPTIMIZATION.

FossilOrigin-Name: 5319a55ab2351288261ebf650bca5f18afbfd5a789f01b8976f8f6a1a7b299c0

2 weeks agoGenerates code to implement either an index search or a table scan,
drh [Sat, 14 Jun 2025 09:54:54 +0000 (09:54 +0000)] 
Generates code to implement either an index search or a table scan,
according to the results of the OP_IfUseIndex opcode.  But does not
always work.  And the OP_IfUseIndex opcode is currently an unconditional
"yes".

FossilOrigin-Name: 9872df2b85cc19b2993fbe5d1303d902dea6ed825f7f775232ac32bfc4880824

3 weeks agoFurther improvements to the EQP text for flex-search.
drh [Fri, 13 Jun 2025 11:08:30 +0000 (11:08 +0000)] 
Further improvements to the EQP text for flex-search.

FossilOrigin-Name: 40a83da50303fa0dd3fae16f35054ef73e41bd2bb170e8c0558aa6d1143aad8c

3 weeks agoChange the flex-search EQP message to be "SEARCH ... OR SCAN" as this seems
drh [Fri, 13 Jun 2025 00:50:14 +0000 (00:50 +0000)] 
Change the flex-search EQP message to be "SEARCH ... OR SCAN" as this seems
less disruptive and more readable.

FossilOrigin-Name: 680e278c3e15d3d2c2e7826bdc8fdf0b5e2086cda0a441fffb13acf9103721a0

3 weeks agoFix test cases on the expert extension.
drh [Fri, 13 Jun 2025 00:25:01 +0000 (00:25 +0000)] 
Fix test cases on the expert extension.

FossilOrigin-Name: c46feb36b50d6128177caac346d62643a499a5dbd9d228e225fc4be4bf058240

3 weeks agoPreliminary code generation for flex-search. Add a no-op IfUseIndex opcode
drh [Thu, 12 Jun 2025 19:02:54 +0000 (19:02 +0000)] 
Preliminary code generation for flex-search.  Add a no-op IfUseIndex opcode
as a placeholder.

FossilOrigin-Name: 521948c64fc7a043e891e4dc3255bd59a76332c58b34d81057eecdf2fef31a63

3 weeks agoMerge latest trunk enhancements and fixes into the experimental
drh [Thu, 12 Jun 2025 13:40:29 +0000 (13:40 +0000)] 
Merge latest trunk enhancements and fixes into the experimental
flex-search branch.

FossilOrigin-Name: 51c89c886f1846e297d249c85d18b047c76ba352ed998e48220e96a6a567b4a8

3 weeks agoHave sqlite3_setlk_timeout() take the database handle mutex. This fixes an assert...
dan [Thu, 12 Jun 2025 07:35:38 +0000 (07:35 +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: a95d126e1330e1b83f42b51f97c4c216622cf38062f3b5d72ccb76313187e850

3 weeks agoFix a problem with UPDATEs on fts5 tables that contain blob values.
dan [Wed, 11 Jun 2025 15:03:53 +0000 (15:03 +0000)] 
Fix a problem with UPDATEs on fts5 tables that contain blob values.

FossilOrigin-Name: badf3014bd1620fd3d4b8013f641fd820b249649fb93cc75b7b8df9dfd6f32a6

3 weeks agoFix the concat_ws() SQL function so that it includes empty strings in the
drh [Wed, 11 Jun 2025 00:01:42 +0000 (00:01 +0000)] 
Fix the concat_ws() SQL function so that it includes empty strings in the
concatenation.  [forum:/forumpost/52503ac21d|Forum post 52503ac21d].

FossilOrigin-Name: 80a78987da484d435a8242c05c48d546d430920df713b24a9d9d9fff7ba1113d

3 weeks agoImproved selection of the divisor when subdividing nested Bitvec objects.
drh [Tue, 10 Jun 2025 19:52:21 +0000 (19:52 +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: f7ab764ed9df6d7a4a96cb0933d291f00174f33fed3d9951785078fe225adcb7

3 weeks agoMinor corrections to the new Bitvec testing logic.
drh [Tue, 10 Jun 2025 18:26:09 +0000 (18:26 +0000)] 
Minor corrections to the new Bitvec testing logic.

FossilOrigin-Name: 77b79ca1277419b91589aff2c601d4abdd7107d48019a58f7f7c85d96c2a538e

3 weeks agoEnhancements to sqlite3BitvecBuiltinTest() that allow testing code to
drh [Tue, 10 Jun 2025 17:22:53 +0000 (17:22 +0000)] 
Enhancements to sqlite3BitvecBuiltinTest() that allow testing code to
create very large Bitvec objects that do not use the linear array cross-check.

FossilOrigin-Name: c5680672cae23f65637eebf66f3bb983a2864be03ea70378832034f3c89ef728

3 weeks agoImproved diagnostics for Bitvec: Add the sqlite3ShowBitvec() routine that
drh [Tue, 10 Jun 2025 16:02:29 +0000 (16:02 +0000)] 
Improved diagnostics for Bitvec:  Add the sqlite3ShowBitvec() routine that
can be called from a debugger (only available with SQLITE_DEBUG).  Add new
output opcodes for sqlite3BitvecBuiltinTest().

FossilOrigin-Name: dea1e37fa67ada6efc1533b449d9eb22338d9e58eec8f89b48c38319c212c8f4

3 weeks agoAdjustments to ext/misc/fileio.c in an attempt to get it to build using mingw.
drh [Mon, 9 Jun 2025 22:38:34 +0000 (22:38 +0000)] 
Adjustments to ext/misc/fileio.c in an attempt to get it to build using mingw.

FossilOrigin-Name: 96b14a3f1193de8f30e9fa704f87558dab8027a218868d32e47688cd5df497b7

3 weeks agoInitial implementation of sqlite3BtreeEstimatedPosition() with the
drh [Mon, 9 Jun 2025 16:32:26 +0000 (16:32 +0000)] 
Initial implementation of sqlite3BtreeEstimatedPosition() with the
est_rank() SQL function used for testing.

FossilOrigin-Name: e93048425bb7183efc047d0f6b39f214491fee869b8ed8006c6ec6eb0e3ec417

3 weeks agoQuery planner identifies loops where it might be advantageous to check
drh [Sat, 7 Jun 2025 16:45:05 +0000 (16:45 +0000)] 
Query planner identifies loops where it might be advantageous to check
the number of matching rows and fall back to a full table scan if the
number of matching rows is large.

FossilOrigin-Name: 87fd19925752b52c767e1202f297a8ec24a6a9ab3d741b6af216b6ad5abd59d5

4 weeks agoRemove unnecessary whitespace and otherwise improve comments in the
drh [Fri, 6 Jun 2025 23:10:18 +0000 (23:10 +0000)] 
Remove unnecessary whitespace and otherwise improve comments in the
wherecode.c module.  No coding changes.

FossilOrigin-Name: 2eb4e9bf0f2df50324a62fb272a92bbd931b8b4e4b35bac0c05b676c97b61339

4 weeks agoUpdate the "msort" function in Lemon so that it works with lists of any
drh [Fri, 6 Jun 2025 23:02:03 +0000 (23:02 +0000)] 
Update the "msort" function in Lemon so that it works with lists of any
length, and also so that the sort is stable.  This patch was motivated by
[forum:/forumpost/63750d717c9ed961|forum post 63750d717c] but was
independently developed, then tested by temporarily setting LISTSIZE to 2.

FossilOrigin-Name: aba5c3135edf7de2798ad808fa0ff176fdba3f4a9b101f1f4210b441cba8e75d

4 weeks agoRemove the clunky test_windirent.h and test_windirent.c files from src/
drh [Thu, 5 Jun 2025 20:12:41 +0000 (20:12 +0000)] 
Remove the clunky test_windirent.h and test_windirent.c files from src/
and replace them with a much cleaner and more compact ext/misc/windirent.h.

FossilOrigin-Name: acc978df52ec41ffdb5c27764f30d53efa1f25a314b7d98983dc0d211a36b570

4 weeks agoEnhance the FSDIR virtual table with a new "level" column. The query planner
drh [Thu, 5 Jun 2025 18:28:54 +0000 (18:28 +0000)] 
Enhance the FSDIR virtual table with a new "level" column.  The query planner
knows how to optimize to avoid search deeper than the maximum requested level.

FossilOrigin-Name: 1ddc0f9e79c33957961bc1443ccb74d756a02cbd20850052079782e76aef2706

4 weeks agotea build: add an info-exists check after a 'scan' call, as scan does not create...
stephan [Wed, 4 Jun 2025 18:34:20 +0000 (18:34 +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: 4f21874d5d20aef2e2d67a59e4fa03d98aa6514b16e4d956acfc817142cfbdb6

4 weeks agoApply the duplicate 'export default' workaround to the (untested and unsupported...
stephan [Tue, 3 Jun 2025 18:10:59 +0000 (18:10 +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: 2f8a1b79533879e4975b405c46fea496ba8bffbef065e7dd0ad29fd4aa8f8f92

4 weeks agoEnhance sqlite3_rsync so that it works even if the replica database is
drh [Tue, 3 Jun 2025 10:49:51 +0000 (10:49 +0000)] 
Enhance sqlite3_rsync so that it works even if the replica database is
initially malformed.

FossilOrigin-Name: ea1754f7d8a770477a1b19b606b27724fdc0b733e51fef32c1ef834f972c3cc5

4 weeks agoFix an off-by-one error in sqlite3_rsync, reported in
drh [Tue, 3 Jun 2025 10:28:47 +0000 (10:28 +0000)] 
Fix an off-by-one error in sqlite3_rsync, reported in
[forum:/forumpost/b6d78f60fc|forum post b6d78f60fc].

FossilOrigin-Name: 27d9e8e79b921c4a86916556f3bf56b94684a7e3d40166c0fdaaf750d4011de0

4 weeks agoFix harmless compiler warning introduced by the setlk-snapshot-fix merge.
drh [Tue, 3 Jun 2025 10:18:54 +0000 (10:18 +0000)] 
Fix harmless compiler warning introduced by the setlk-snapshot-fix merge.

FossilOrigin-Name: c1f20f89d9eb3e1dd1018c0e0efe5d3043a592f078e235ad04b960334c7186c2

4 weeks agoFix JSONB edit so that when it is trying to reduce the size of an element
drh [Mon, 2 Jun 2025 23:34:42 +0000 (23:34 +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: 5b3de6e8ab6b228bf6c0e0c31b50ca29d8b7852b460eaaca6c6ecf5a3c083cab

4 weeks agoIncrease the version number to 3.51.0
drh [Mon, 2 Jun 2025 18:58:42 +0000 (18:58 +0000)] 
Increase the version number to 3.51.0

FossilOrigin-Name: ed69d4432712603bea2161e0ca0c99e59480fb000e1cbf1aa1401d924544e351

4 weeks agoFixes to ensure SQLITE_ENABLE_SETLK_TIMEOUT builds use a blocking lock and do not...
dan [Mon, 2 Jun 2025 18:48:36 +0000 (18:48 +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: 7f9c0cdd0630a41db359b188b226a1ad6a3bae1663c27169acfe25edc7fb171b

4 weeks agoFix os_win.c so that SQLITE_ENABLE_SETLK_TIMEOUT=2 builds work on windows. setlk-snapshot-fix
dan [Mon, 2 Jun 2025 18:37:32 +0000 (18:37 +0000)] 
Fix os_win.c so that SQLITE_ENABLE_SETLK_TIMEOUT=2 builds work on windows.

FossilOrigin-Name: 8efb95e0d4670b9c5dbd8cf34512334f47951a8dff8fdadc8645f75076acd91f

4 weeks agoImprove the accuracy of affinity and collating sequence analysis for
drh [Mon, 2 Jun 2025 18:34:17 +0000 (18:34 +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.  Initial problem report in
[forum:/forumpost/829306db47|forum post 829306db47].

FossilOrigin-Name: f184d1d236e47962658a4639d9533f67a525b74cfe0f06c93e9b85fdcd02a15f

4 weeks agoUpdates to new test cases to run with SQLITE_ENABLE_SETLK_TIMEOUT=2 builds.
dan [Mon, 2 Jun 2025 18:09:46 +0000 (18:09 +0000)] 
Updates to new test cases to run with SQLITE_ENABLE_SETLK_TIMEOUT=2 builds.

FossilOrigin-Name: c6d3e3542fdf6a3428d3a2ec20c699c169ed53341dc782d81f7fe5944f769748

4 weeks agoMerge trunk changes into this branch.
dan [Mon, 2 Jun 2025 17:44:10 +0000 (17:44 +0000)] 
Merge trunk changes into this branch.

FossilOrigin-Name: 7d27451804e525190f8e67da75aaeb3bf2de677021f7566c6681398e60a88c72

4 weeks agoSlight modernization of the TEA README.txt.
stephan [Mon, 2 Jun 2025 15:17:59 +0000 (15:17 +0000)] 
Slight modernization of the TEA README.txt.

FossilOrigin-Name: bf7be67e3fb7b75fc281997f7bf9aa69eaf4da6bdf2fefe359b12d25ec95f512

4 weeks agoTEA: remove the stale man page and references to the MSC makefiles from the README...
stephan [Mon, 2 Jun 2025 15:10:41 +0000 (15:10 +0000)] 
TEA: remove the stale man page and references to the MSC makefiles from the README.txt. Based on discussion at [forum:87e6660191a472c5 | forum post 87e6660191a472c5].  A couple of weeks ago we internally discussed pulling in the MSC makefiles from the 3.49 tree but they are stale and possibly unused, so opted against it for the time being.

FossilOrigin-Name: c9888a409565e6c8891a3dafa56962df364fb729a61df2701dc0bb282e36fb75

4 weeks agoRemove an unnecessary parameter from sqlite3VdbeRecordUnpack(). Improved
drh [Mon, 2 Jun 2025 13:54:33 +0000 (13:54 +0000)] 
Remove an unnecessary parameter from sqlite3VdbeRecordUnpack().  Improved
comments and assert()s on KeyInfo.

FossilOrigin-Name: 387f4c4d98b8fb83f6ae406e4143dabda7766e8752b7f6ca104655e51330c978

4 weeks agoFix stale comments related to KeyInfo. Add new assert()s associated with
drh [Mon, 2 Jun 2025 09:49:07 +0000 (09:49 +0000)] 
Fix stale comments related to KeyInfo.  Add new assert()s associated with
memory management of KeyInfo.

FossilOrigin-Name: abd805bc76f14ede7359b029908179b7ca57e929c5918acae1403ef73ae0bd47

4 weeks agoFix an off-by-one error in the size computation of a vdbe-sorter.
drh [Sun, 1 Jun 2025 21:38:35 +0000 (21:38 +0000)] 
Fix an off-by-one error in the size computation of a vdbe-sorter.
[forum:/forumpost/c1cc8b057a|Forum post c1cc8b057a].
Problem introduced by checkin [d4307a0d43f42e96].

FossilOrigin-Name: 8b7a7fcf62e5c2742c243808fa482472954f2b4aae0bc7ae513bc07065c93737

4 weeks agoFix VACUUM so that it works even when ATTACH_WRITE is disabled.
drh [Sun, 1 Jun 2025 16:10:25 +0000 (16:10 +0000)] 
Fix VACUUM so that it works even when ATTACH_WRITE is disabled.

FossilOrigin-Name: 42494f85acb303919d3f1f2202f8b95fbd657652da4b8dc00451c10ea6c496e0

4 weeks agoEnhance "box" and "column" mode formatting in the CLI to better deal with
drh [Sat, 31 May 2025 20:51:42 +0000 (20:51 +0000)] 
Enhance "box" and "column" mode formatting in the CLI to better deal with
double-wide characters.

FossilOrigin-Name: b0de22ed0abf2ea5d269f191c884d7b2be167a2ed27018c25aaa0ea238cd621a

4 weeks agoUpdate a few test scripts so that they run on windows.
dan [Sat, 31 May 2025 19:55:07 +0000 (19:55 +0000)] 
Update a few test scripts so that they run on windows.

FossilOrigin-Name: 14a18f4e3a3f35e636262a253364ab1e8054ed38c0c7fd482633522cbcf5ffc4

4 weeks agoNew makefile target "xdevtest" works like "releasetest" except that it
drh [Sat, 31 May 2025 18:26:37 +0000 (18:26 +0000)] 
New makefile target "xdevtest" works like "releasetest" except that it
omits the "verify-source" dependency so that it can be run with uncommitted
changes in the source tree.

FossilOrigin-Name: 1afb1ac3e9f0a122f1374799c09b60a0dd5443434d4567d94385096ada91bf12

4 weeks agoFix an affinity problem caused by a USING or NATURAL JOIN on the LHS of a FULL JOIN...
dan [Sat, 31 May 2025 18:16:21 +0000 (18:16 +0000)] 
Fix an affinity problem caused by a USING or NATURAL JOIN on the LHS of a FULL JOIN. [forum:/forumpost/5028c785b6|Forum post 5028c785b6].

FossilOrigin-Name: 8d393ca07fe09f48d77adb517e2e4baaa58a9251422de62a0504999205d3ea1d

4 weeks agoRelax query flattener constraint (3b) and thereby allow flattening the RHS of
drh [Sat, 31 May 2025 16:17:14 +0000 (16:17 +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 was previously
disallowed by [9dbae1df75219e2a] as a performance optimization.  It
turns out that the constraint causes performance issues, and we do not have
a record of any performance issue that it solves.

FossilOrigin-Name: 1ddaa92057e550ea281d45d9860eafe69399224725548a93dd91c47a34e52152

4 weeks agoFix assert() statements in os_unix.c and os_win.c. Allow walsetlk_recover.test to...
dan [Sat, 31 May 2025 15:10:41 +0000 (15:10 +0000)] 
Fix assert() statements in os_unix.c and os_win.c. Allow walsetlk_recover.test to run in non-SQLITE_ENABLE_SNAPSHOT builds.

FossilOrigin-Name: 9f521ecda2b8d2f383cc84e308b3a4adfcf1bd6339eb834c8fa76c8704c861b7

4 weeks agoMove a mis-located makefile comment block.
stephan [Sat, 31 May 2025 11:08:06 +0000 (11:08 +0000)] 
Move a mis-located makefile comment block.

FossilOrigin-Name: 7d884386bec11f47c2c18002dd8c573c9b5cb6f7cdf2307a96cccead05b6abf2

4 weeks agotcl extension: UDFs may now 'break' to return an SQL NULL. Add the (eval -asdict...
stephan [Sat, 31 May 2025 11:02:06 +0000 (11:02 +0000)] 
tcl extension: UDFs may now 'break' to return an SQL NULL. Add the (eval -asdict) flag to use a dict, instead of an array, for the eval row data.

FossilOrigin-Name: 413a626b5c7902c1810142536c36e4ea8ee7c616ea82dfe1114199f9319091f7

4 weeks agoAdd some missing UNUSED_PARAMETER() annotations to squelch downstream build warnings...
stephan [Sat, 31 May 2025 09:44:00 +0000 (09:44 +0000)] 
Add some missing UNUSED_PARAMETER() annotations to squelch downstream build warnings when using -Wextra -pedantic.

FossilOrigin-Name: a98a2f49355ec39c56e571c70d377675b1bd99a6d43cf9217b0eb1e081895d8e

5 weeks agoFollow-up to the previous: The same optimization suppression needs to
drh [Fri, 30 May 2025 22:58:09 +0000 (22:58 +0000)] 
Follow-up to the previous:  The same optimization suppression needs to
happen if the left-hand side is coming from a LEFT JOIN.

FossilOrigin-Name: cf5b37b3a39013d8ca9de92da2289346caf52b56daff59e19b140cc586a3421f

5 weeks agoIf blocking locks are enabled, avoid using the busy handler when blocked by another...
dan [Fri, 30 May 2025 20:52:18 +0000 (20:52 +0000)] 
If blocking locks are enabled, avoid using the busy handler when blocked by another process running recovery.

FossilOrigin-Name: a35236757ab57c4c9b34e47c5dbc10d8f1220f8152955f5303cf9c3902ee169b

5 weeks agoWhen synthesizing an ON constraint from a USING or NATURAL, if the left-hand
drh [Fri, 30 May 2025 19:55:46 +0000 (19:55 +0000)] 
When synthesizing an ON constraint from a USING or NATURAL, if the left-hand
side is coming from a RIGHT JOIN, be sure to set the EP_CanBeNull flag so that
the optimizer knows to check for NULL even if the column has a NOT NULL
constraint.  Fix for the problem reported by
[forum:/forumpost/4fc70203b61c7e12|forum post 4fc70203b61]

FossilOrigin-Name: 60adc78a22956429d34ccc4e2c193c5994c11c3b3cff7901d47fad7d92dba935

5 weeks agoAvoid invoking the busy-handler if a blocking lock times out while attempting to...
dan [Fri, 30 May 2025 18:23:03 +0000 (18:23 +0000)] 
Avoid invoking the busy-handler if a blocking lock times out while attempting to open a snapshot transaction.

FossilOrigin-Name: fe11f85fd3283bb7002f43bd8b796e9e7b67f6d1a92eb676be06b46d1458fc1d

5 weeks agoConfigure-related fixes and additions, most notably integration of self-tests for...
stephan [Fri, 30 May 2025 16:08:31 +0000 (16:08 +0000)] 
Configure-related fixes and additions, most notably integration of self-tests for proj.tcl's APIs. Teaish make-install fixes based on the discussion in [forum:87e6660191a472c5 | forum thread 87e6660191a472c5].

FossilOrigin-Name: 2e486f8fd011d28fdd7e59ff34f7f04374019932eb160a8c4de56a5ce01e5782

5 weeks agoRandom typo fixes in JNI docs.
stephan [Fri, 30 May 2025 15:46:52 +0000 (15:46 +0000)] 
Random typo fixes in JNI docs.

FossilOrigin-Name: f63608a3847469b130e029cc569fe6f03a9053352ec43c10d69849cbab4f61c5

5 weeks agoUse a more robust backup definition for offsetof().
drh [Fri, 30 May 2025 15:43:04 +0000 (15:43 +0000)] 
Use a more robust backup definition for offsetof().

FossilOrigin-Name: 22441955e03df07903b98832a60c05c53721cd67c667f6c83d5e97fcc62735ee

5 weeks agoAdd "include <stddef.h>" to fts5 and rtree to ensure that they use the system version...
dan [Fri, 30 May 2025 11:14:11 +0000 (11:14 +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: 838deb7f3423df84061a043928ed34e1d74e2e7d57ef1a9519bb32fea82e4352

5 weeks agoSquelch an interesting but harmless struct initialization warning emitted after an...
stephan [Fri, 30 May 2025 10:18:09 +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: 10d0897cc9a5998fe1344cfbb242a78b59012e29aa3b1993895dfac26721b053

5 weeks agoFix the missing -lm link flag for the sqlite3 shell when building the autoconf bundle...
stephan [Thu, 29 May 2025 20:29:13 +0000 (20:29 +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: f6318c4a6b5a133657741c066ef2c76a71880dbc98cfff1fdd632637daf002dc

5 weeks agoExtend the fix for ticket [623eff57e76d45f6] so that it covers RIGHT JOIN
drh [Thu, 29 May 2025 18:44:41 +0000 (18:44 +0000)] 
Extend the fix for ticket [623eff57e76d45f6] so that it covers RIGHT JOIN
in addition to LEFT JOIN.  Problem reported by
[forum:/forumpost/7dee41d32506c4ae|forum post 2025-05-29T15:10:14Z].

FossilOrigin-Name: 29b1e1b97619d03a97ef562a5707929e241d019179b4ff1d0bc2a8c008441431

5 weeks agoFix a goofy hash function in Lemon. No changes to SQLite itself.
drh [Thu, 29 May 2025 17:46:34 +0000 (17:46 +0000)] 
Fix a goofy hash function in Lemon.  No changes to SQLite itself.

FossilOrigin-Name: d6cbabe23d3919d5bde6a83421cdae92125caec09d5c39a648d0305878c6a1dc

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

6 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

6 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

6 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