]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 weeks agoVersion 3.53.3 for the reuse-schema-3.53 subbranch reuse-schema-3.53
drh [Fri, 26 Jun 2026 20:40:35 +0000 (20:40 +0000)] 
Version 3.53.3 for the reuse-schema-3.53 subbranch

FossilOrigin-Name: b47ab6f6474dfd6a0b140cdc8f2066bd0a50ece75555eb8f5e0d434485c72efd

2 weeks agoVersion 3.53.3 release version-3.53.3
drh [Fri, 26 Jun 2026 20:14:12 +0000 (20:14 +0000)] 
Version 3.53.3

FossilOrigin-Name: d4c0e51e4aeb96955b99185ab9cde75c339e2c29c3f3f12428d364a10d782c62

2 weeks agoHave API functions sqlite3_serialize, sqlite3_limit, sqlite3_busy_timeout, sqlite3_er...
dan [Fri, 26 Jun 2026 17:36:58 +0000 (17:36 +0000)] 
Have API functions sqlite3_serialize, sqlite3_limit, sqlite3_busy_timeout, sqlite3_error_offset, sqlite3_db_name, sqlite3_get_autocommit, sqlite3_errcode, sqlite3_total_changes64, sqlite3_changes64, sqlite3_last_insert_rowid and sqlite3_expired take and hold the database mutex while running.

FossilOrigin-Name: 0d57a60060ee822137f3c1cf7ba1cf40ded024d038981bd51b9cab3bf7f42b2f

2 weeks agoUpdate the reuse-schema-3.53 subbranch to include all of the latest patches
drh [Fri, 26 Jun 2026 16:35:35 +0000 (16:35 +0000)] 
Update the reuse-schema-3.53 subbranch to include all of the latest patches
in branch-3.53.

FossilOrigin-Name: 1941527ec34fda32acdb896563d22283f599533e3059c98e220ea2a917d6744c

2 weeks agoFix both a buffer overread and overwrite in the sessions rebase module.
drh [Fri, 26 Jun 2026 15:17:08 +0000 (15:17 +0000)] 
Fix both a buffer overread and overwrite in the sessions rebase module.

FossilOrigin-Name: 12d0d2363a3082f68153393ed1aa91264ee987bc9187e7afd131d503f66e4faa

2 weeks agoFix parsing of unterminated "[" tokens in the incremental integrity
drh [Fri, 26 Jun 2026 14:47:07 +0000 (14:47 +0000)] 
Fix parsing of unterminated "[" tokens in the incremental integrity
check extension.

FossilOrigin-Name: 6a55dc85b73ef98f0ef31d7b0740bfe46ebb25653f2dff4eb34074d1b455925a

2 weeks agoAvoid 32-bit integer overflow in the zipfile extension given
drh [Fri, 26 Jun 2026 14:22:53 +0000 (14:22 +0000)] 
Avoid 32-bit integer overflow in the zipfile extension given
ridiculous arguments.

FossilOrigin-Name: 2e1fdfbcc91da03795d6bb27980a329dc710d5c4c8540aa6e77413e29210be0e

2 weeks agoFix a buffer overread that could occur in fts5 within a memcmp() when doing an integr...
drh [Fri, 26 Jun 2026 14:11:19 +0000 (14:11 +0000)] 
Fix a buffer overread that could occur in fts5 within a memcmp() when doing an integrity-check on corrupted records.

FossilOrigin-Name: f73adcfc87803f373b7c55ec280e3bcae4b9f3a1f3edc2ee21bf12c696a46be4

2 weeks agoFix parsing of quoted instantiation arguments in the spellfix extension.
drh [Fri, 26 Jun 2026 13:55:52 +0000 (13:55 +0000)] 
Fix parsing of quoted instantiation arguments in the spellfix extension.

FossilOrigin-Name: c4af6acfb0d04b418ad089ee619317a631a2dff5c7d45a88f704dbcb006f98d8

2 weeks agoFix unbounded whitespace skip in the decimal extension.
drh [Fri, 26 Jun 2026 13:52:02 +0000 (13:52 +0000)] 
Fix unbounded whitespace skip in the decimal extension.

FossilOrigin-Name: 9a1729a4840e8640770d557657742355f2723f2dda05efeaaf6641af730c34b8

2 weeks agoExtra margin to prevent queue overflow in the RTree extension.
drh [Fri, 26 Jun 2026 13:36:18 +0000 (13:36 +0000)] 
Extra margin to prevent queue overflow in the RTree extension.

FossilOrigin-Name: 27f80408b8a499f50959e21fb1c039c6e430257ac7ceb11f5c3600b120b64258

2 weeks agoFix the (non-deliverable, testing-use-only) closure extension so that it
drh [Fri, 26 Jun 2026 13:07:11 +0000 (13:07 +0000)] 
Fix the (non-deliverable, testing-use-only) closure extension so that it
parses quoted instantiation arguments correctly.

FossilOrigin-Name: edfe25b68a37bde4ae535285a11b24f721fbd76d9af8ee264d62c170f45bf52c

2 weeks agoFix the size of an allocation in fts3 to take into account that when merging a phrase...
drh [Fri, 26 Jun 2026 12:59:28 +0000 (12:59 +0000)] 
Fix the size of an allocation in fts3 to take into account that when merging a phrase doclist, each entry may grow by up to 1 byte if the rhs position of the merged lists is stored.

FossilOrigin-Name: bbaad09b3d090ba24c2069424d94897ebdef7c5fed13db9383d9cb363e3aa91a

2 weeks agoImproved detection of corrupt freelist chains on btree pages.
drh [Fri, 26 Jun 2026 10:02:37 +0000 (10:02 +0000)] 
Improved detection of corrupt freelist chains on btree pages.
Plus, add assert()s to verify that the min-heap does not overflow
inside of PRAGMA integrity_check.

FossilOrigin-Name: 1a888ea60be20a80e85a108a74dab0dd9faf72ca89389defeeb9c99ecafb3ea4

2 weeks agoFix compiler warnings.
drh [Fri, 26 Jun 2026 02:03:54 +0000 (02:03 +0000)] 
Fix compiler warnings.

FossilOrigin-Name: 512d9449451c883a68a543f5ab8372b31324baf6216de7f71f7fc7589f2e1aab

2 weeks agoHave sqlite3_drop_modules() take the database mutex.
dan [Thu, 25 Jun 2026 14:47:46 +0000 (14:47 +0000)] 
Have sqlite3_drop_modules() take the database mutex.

FossilOrigin-Name: 7927329d25caab7f607c8857bc6b6fc56a9ba99fbd15087076a7983b2369b4eb

2 weeks agoCheck for cells extending too far past the end of a page while search
drh [Wed, 24 Jun 2026 20:31:41 +0000 (20:31 +0000)] 
Check for cells extending too far past the end of a page while search
an index.

FossilOrigin-Name: 6826c17021eb1af5ed4266fc26486532d0fd4fb1494a582a4ff84fb59ecec254

2 weeks agoWhen rolling back a journal that contains a super-journal pointer, only attempt to...
drh [Wed, 24 Jun 2026 20:28:31 +0000 (20:28 +0000)] 
When rolling back a journal that contains a super-journal pointer, only attempt to unlink the super-journal if (a) the filename looks like one that SQLite might have generated, and (b) the super-journal contains the name of the journal being rolled back. This is to limit the extent to which SQLite can be caused to delete arbitrary files by supplying it with a crafted hot-journal.

FossilOrigin-Name: 9471fa2c9ce03713b875b3350d65b5ed6e38e501585126bb3b90694800edfb25

2 weeks agoFix the sqlite3ParseUri() for improved defenses against ridiculously long
drh [Wed, 24 Jun 2026 15:16:53 +0000 (15:16 +0000)] 
Fix the sqlite3ParseUri() for improved defenses against ridiculously long
URI inputs causing integer overflow problems.

FossilOrigin-Name: a9cea5b555eed4315e426ee8168029840cacb165d1fcd5e2d21a105db84dc46e

2 weeks agoRevert the recent fixes to backup code and instead fix the problem reported by forum...
dan [Wed, 24 Jun 2026 14:27:21 +0000 (14:27 +0000)] 
Revert the recent fixes to backup code and instead fix the problem reported by forum post [forum:15d82885e2 | 15d82885e2] (that a call to sqlite3_deserialize() after sqlite3_backup_init() but before the first call to sqlite3_backup_step() on the destination db of a backup could cause a crash) by deferring caching the pointer to the destination Btree until after it is locked.

FossilOrigin-Name: d9177ed965d1284c1c8d2c6fbb8db0dd89a42909ff0a3c23e2e761a6be419011

3 weeks agoMerge the fixes for the use-after-free problem caused by executing an ATTACH when...
dan [Tue, 23 Jun 2026 20:28:51 +0000 (20:28 +0000)] 
Merge the fixes for the use-after-free problem caused by executing an ATTACH when a backup operation was active, and for the OOB read in the unused spellfix1 extension.

FossilOrigin-Name: 121a749d0f3d54eef7f35d527f0eed9a2531ac741452ed85d4c49556df8955ea

3 weeks agoDo not use shared locks on SHM files when the filename is a long DOS-device
drh [Tue, 23 Jun 2026 15:16:15 +0000 (15:16 +0000)] 
Do not use shared locks on SHM files when the filename is a long DOS-device
path.  Only used shared locks for UNC paths.  Do not confuse the
long-DOS-device syntax with UNC paths.
[https://bugzilla.mozilla.org/show_bug.cgi?id=2016438|Bugzilla 2016438].

FossilOrigin-Name: 246f46614fbdbc2609ee1c6fffe446abd6c0121c3e626a1776bf7e09759bc973

3 weeks agoFix a NULL pointer dereference that could occur in the unionvtab virtual table if...
drh [Tue, 23 Jun 2026 13:26:15 +0000 (13:26 +0000)] 
Fix a NULL pointer dereference that could occur in the unionvtab virtual table if the configuration SQL returned an SQL NULL value in place of a table name.

FossilOrigin-Name: 7e8de3ba28224a293fd1c220c3bf7ac5f721a01125debc5dce39f16745c43c17

3 weeks agoFix a NULL pointer dereference that can occur when misusing a extension
drh [Tue, 23 Jun 2026 11:16:22 +0000 (11:16 +0000)] 
Fix a NULL pointer dereference that can occur when misusing a extension
virtual table that was created for testing purposes.

FossilOrigin-Name: ee4f5d82a3347863f2eb544c780d3efcc00bb43d7ea2495aaf21099f73cf800f

3 weeks agoFixes for three separate AI-discovered bugs in non-deliverable extensions.
drh [Tue, 23 Jun 2026 10:56:26 +0000 (10:56 +0000)] 
Fixes for three separate AI-discovered bugs in non-deliverable extensions.

FossilOrigin-Name: c980094956a348423469015952455a97df3ca08709338aa03ea8bbb418e8af24

3 weeks agoFixes for kvvfs journaling. Bug reports [bugs:20e208fe172cae4f|2026-06-20T08:49:41Z...
stephan [Mon, 22 Jun 2026 10:38:03 +0000 (10:38 +0000)] 
Fixes for kvvfs journaling. Bug reports [bugs:20e208fe172cae4f|2026-06-20T08:49:41Z] and [bugs:76acc88b573e3a16|2026-06-20T18:35:54Z].

FossilOrigin-Name: 4c773f5d64246c7c47a569218215787ba2104bc2966c4bbd8907b936e396f6ea

3 weeks agoFix a cast in fts3_write so that it is applied as intended.
drh [Fri, 19 Jun 2026 12:14:55 +0000 (12:14 +0000)] 
Fix a cast in fts3_write so that it is applied as intended.

FossilOrigin-Name: 6c22c34e9a7bc7bb68680de87a73667f21d14bf201990040423afc426c23a4af

3 weeks agoFix an fts5 problem causing attempts to create locale=1 tables with more than 115...
drh [Fri, 19 Jun 2026 11:18:51 +0000 (11:18 +0000)] 
Fix an fts5 problem causing attempts to create locale=1 tables with more than 115 columns to fail.

FossilOrigin-Name: 4d993e8f5ffe4d34d4b1c579f9d50b60be6a3c6738e1c06d298e43b1222f7a66

3 weeks agoFix CLI CSV test cases so that they suppress the CR on windows and thus
drh [Wed, 17 Jun 2026 14:12:07 +0000 (14:12 +0000)] 
Fix CLI CSV test cases so that they suppress the CR on windows and thus
work cross-platform.  Test case changes only - no changes to code.

FossilOrigin-Name: 89d9120af9b5ff9d2e1ed019270a539a8334c9395ea4035ecc021d90b3ddb764

3 weeks agoImproved detection of when the alternative windows-compatible main() is
drh [Wed, 17 Jun 2026 09:46:23 +0000 (09:46 +0000)] 
Improved detection of when the alternative windows-compatible main() is
needed in the sqldiff.exe utility.

FossilOrigin-Name: 571846a9c2c9605680eab09ce994ad15908db2933cb104c3a88ddad9c409e6d9

4 weeks agoLimit VIEW recursion depth to SQLITE_LIMIT_EXPR_DEPTH to prevent
drh [Tue, 16 Jun 2026 13:46:54 +0000 (13:46 +0000)] 
Limit VIEW recursion depth to SQLITE_LIMIT_EXPR_DEPTH to prevent
static overflow in malicious schemas with tens of thousands of
levels of recursive views.

FossilOrigin-Name: 38430aa5ed787ab8d24cc4d7f03b5528168e12b1f59ecfce9c471cd755b81cc7

4 weeks agoFix instances of potential buffer overflow caused by loading the contents of a stat4...
drh [Tue, 16 Jun 2026 12:02:02 +0000 (12:02 +0000)] 
Fix instances of potential buffer overflow caused by loading the contents of a stat4 table with an absurd number of samples in a 32-bit build.

FossilOrigin-Name: c25ac7af868864f9ec05118c3b8f645e9db00d3c7e6963801fc2489e57218e2b

4 weeks agoEnhance SQLITE_LIMIT_TRIGGER_DEPTH so that it also limits a chain of
drh [Mon, 15 Jun 2026 16:49:06 +0000 (16:49 +0000)] 
Enhance SQLITE_LIMIT_TRIGGER_DEPTH so that it also limits a chain of
distinct triggers during code generation.

FossilOrigin-Name: b22709dcb3d967e1ad9a8c0bd0ab7335efda0933d643e734d24e8cfc79325249

4 weeks agoFix a problem sometimes causing an UPSERT to incorrectly convert an excluded.* column...
drh [Mon, 15 Jun 2026 16:46:14 +0000 (16:46 +0000)] 
Fix a problem sometimes causing an UPSERT to incorrectly convert an excluded.* column from type REAL to INT in cases where doing so does not cause data loss.

FossilOrigin-Name: 5d344e02887996cded51e4b1febe7a3bb488b0f05465653cc0daac34e8ba036c

4 weeks agoImprovements to handling of inequality constraints on generate_series().value
drh [Mon, 15 Jun 2026 16:27:51 +0000 (16:27 +0000)] 
Improvements to handling of inequality constraints on generate_series().value
against very large floating-point values.

FossilOrigin-Name: e10ff7cd09e962c207f897c38b83a813a3214fd4ac11e6a71ac577f21ba09fba

4 weeks agoAvoid a possible buffer overrun in 32-bit builds of fts5 that could occur when proces...
drh [Mon, 15 Jun 2026 13:53:44 +0000 (13:53 +0000)] 
Avoid a possible buffer overrun in 32-bit builds of fts5 that could occur when processing corrupt records.

FossilOrigin-Name: 3a4667ce36a1548fffff8bbf946d84d6bbd21e7abb216d1f37717de74ce7e2a7

4 weeks agoFix a problem that could cause fts5 to return incorrect answers when performing prefi...
drh [Mon, 15 Jun 2026 11:52:31 +0000 (11:52 +0000)] 
Fix a problem that could cause fts5 to return incorrect answers when performing prefix queries on tokens with synonyms.

FossilOrigin-Name: 4f21004f9b5fc9766183a3c4ac44cfeb6cd3e5583fef9176a26fecc2910f8c08

4 weeks agoFix rounding behavior in the decimal extension when all leading digits
drh [Mon, 15 Jun 2026 10:16:23 +0000 (10:16 +0000)] 
Fix rounding behavior in the decimal extension when all leading digits
are 9 and there is not fractional component.

FossilOrigin-Name: ae568e059bb179343c31baa3c8bcbe1c64fdcbb28b466af4840963c63d6369f5

4 weeks agoMake the --header option to the CLI sticky, so that it does not get
drh [Sat, 13 Jun 2026 18:17:08 +0000 (18:17 +0000)] 
Make the --header option to the CLI sticky, so that it does not get
turned off by subsequence --csv or similar mode change options.

FossilOrigin-Name: 50193066013df50af113576ae0b59af447212472da6d3824ca5aaf7dc9aab3ec

4 weeks agoWhen reading a super-journal name from a journal file, allocate a new buffer rather...
drh [Fri, 12 Jun 2026 18:38:10 +0000 (18:38 +0000)] 
When reading a super-journal name from a journal file, allocate a new buffer rather than using Pager.pTmpSpace. This prevents a buffer overrun that could occur when using a VFS with a large sqlite3_vfs.mxPathname value with a database with a small page size.

FossilOrigin-Name: aa756c803899a95d5473d32ff222950a3f80fcda5384a7b131d3ba2821af10aa

4 weeks agoFix a buffer overwrite in fts3 that could occur while processing NEAR queries against...
drh [Fri, 12 Jun 2026 16:04:50 +0000 (16:04 +0000)] 
Fix a buffer overwrite in fts3 that could occur while processing NEAR queries against corrupt records.

FossilOrigin-Name: 85afd8e291d280ff2124d1650720dd9934271de6efbd5a50eeaf1b621d3d0a6e

4 weeks agoWhen using a read-only WAL/SHM, handle a corrupt page size in the WAL
drh [Fri, 12 Jun 2026 12:20:36 +0000 (12:20 +0000)] 
When using a read-only WAL/SHM, handle a corrupt page size in the WAL
file correctly.

FossilOrigin-Name: 9a79ca31ff2a55af0e5e8c4d2e7126355a93848ebb8c9caa0ab351202726c63d

4 weeks agoFix a signed integer overflow that could occur in fts3 when processing corrupt databa...
drh [Fri, 12 Jun 2026 11:45:37 +0000 (11:45 +0000)] 
Fix a signed integer overflow that could occur in fts3 when processing corrupt database records.

FossilOrigin-Name: 42fe4d2e8bbb2ff9ebfd8a9b981bd8769f5273bba74cc1795396820f44a443cb

4 weeks agoFix a signed-integer overflow in fts5 that might occur when dealing with strategicly...
drh [Thu, 11 Jun 2026 23:28:49 +0000 (23:28 +0000)] 
Fix a signed-integer overflow in fts5 that might occur when dealing with strategicly corrupted records.

FossilOrigin-Name: a36fc58e55c100f0c26e4426100c15287dc5613e06d5d1fb43845e3c7cda09df

4 weeks agoFix a possible signed integer overflow in the RBU extension given a
drh [Thu, 11 Jun 2026 23:26:01 +0000 (23:26 +0000)] 
Fix a possible signed integer overflow in the RBU extension given a
maliciously crafted delta.

FossilOrigin-Name: c40f3e8e789792615b079ea1ca7968d462a12e0cb4405bd74f407c9a4b5c6188

4 weeks agoHarden code that processes Fossil Deltas against OOM and maliciously
drh [Thu, 11 Jun 2026 23:22:57 +0000 (23:22 +0000)] 
Harden code that processes Fossil Deltas against OOM and maliciously
malformed delta blobs.

FossilOrigin-Name: 1657b9716f043e1af426bbd4ed50073b76c7c1b2f147b124b0b32e824bb83eb3

4 weeks agoEnhance the ".ar -x" command to add the undocumented --debug option and
drh [Thu, 11 Jun 2026 23:18:21 +0000 (23:18 +0000)] 
Enhance the ".ar -x" command to add the undocumented --debug option and
to give enhanced robustness to deliberately malformed archives.

FossilOrigin-Name: cd7bb77fdf6c7bad89068d4138f74a950b67a87cc1582de6172b3547519387cb

4 weeks agoImproved detection of corrupt node IDs in RTree shadow tables.
drh [Thu, 11 Jun 2026 01:37:00 +0000 (01:37 +0000)] 
Improved detection of corrupt node IDs in RTree shadow tables.

FossilOrigin-Name: 4e875ae5c3f0cb28fd40be9f1327d7496f95a55785cad68cb37472e4d1c2e6fd

5 weeks agoFix four obscure yet separate problems in FTS5.
drh [Mon, 8 Jun 2026 19:23:56 +0000 (19:23 +0000)] 
Fix four obscure yet separate problems in FTS5.

FossilOrigin-Name: a6eb055c35f091a8e864c1de3387d389e2bd3025c32596c0b7a78ebdf091898b

5 weeks agoDisable the vector-IN-SELECT optimization if the number of columns is so
drh [Thu, 4 Jun 2026 16:58:53 +0000 (16:58 +0000)] 
Disable the vector-IN-SELECT optimization if the number of columns is so
large that it would cause the WhereTerm.nChild column to wrap.

FossilOrigin-Name: 10d9da4f48623419f9abed17cd05cfa08743377926ca96cf6b457dc01ab062e2

5 weeks agoFix a crash that could be caused by configuring the pager-cache with a bulk allocatio...
drh [Thu, 4 Jun 2026 12:27:17 +0000 (12:27 +0000)] 
Fix a crash that could be caused by configuring the pager-cache with a bulk allocation too small to fit even one page.

FossilOrigin-Name: 3be41e17529d34d083463d967bcb7e07515ce0d6ba616a4a04a68f162ba0cf7f

5 weeks agoRemove the data type ANY added to the shell's CSV imports.
drh [Thu, 4 Jun 2026 11:35:15 +0000 (11:35 +0000)] 
Remove the data type ANY added to the shell's CSV imports.

FossilOrigin-Name: e14e19c1b33b4f4fe7d9008b0f7f8fa9522d901c13124b0eca4b91acd7156d0d

5 weeks agoIncrement the patch level to 3.53.3.
drh [Thu, 4 Jun 2026 11:29:09 +0000 (11:29 +0000)] 
Increment the patch level to 3.53.3.

FossilOrigin-Name: 96818a375ad1d421b26e6c0be61be70735659e294f2cf7c073f8851d8c309430

5 weeks agoFix problems with expressions like "(?,?,?) IN (SELECT c,b,a FROM ...)" when there...
drh [Thu, 4 Jun 2026 11:24:28 +0000 (11:24 +0000)] 
Fix problems with expressions like "(?,?,?) IN (SELECT c,b,a FROM ...)" when there is an index on columns "c", "b" and "a", but not in that order.

FossilOrigin-Name: af0bf4ee7778359d96b43605d947b44bbcef9f489732d0890103992cd970c3b5

5 weeks agoRemove all references to GetNativeSystemInfo() on Windows, which is
drh [Thu, 4 Jun 2026 10:28:26 +0000 (10:28 +0000)] 
Remove all references to GetNativeSystemInfo() on Windows, which is
[forum:/info/f01dc61c5febbe19|reportedly] not available when compiling
with MinGW.

FossilOrigin-Name: 06fcd92e667488b5f7e0f75cbe4c9b59a71713332c4574e348f09fe78c6de7a2

5 weeks agoMerge the 3.53.2 patch release into the reuse-schema-3.53 branch
drh [Wed, 3 Jun 2026 19:28:11 +0000 (19:28 +0000)] 
Merge the 3.53.2 patch release into the reuse-schema-3.53 branch

FossilOrigin-Name: 2524c2f07a67ad792b1ff70fb702cedae7689a55d1ee3556d527363a9eec8c07

5 weeks agoVersion 3.53.2 version-3.53.2
drh [Wed, 3 Jun 2026 19:12:13 +0000 (19:12 +0000)] 
Version 3.53.2

FossilOrigin-Name: d6e03d8c777cfa2d35e3b60d8ec3e0187f3e9f99d8e2ee9cac695fd6fcdf1a24

5 weeks agoFix harmless compiler warning.
drh [Wed, 3 Jun 2026 18:51:23 +0000 (18:51 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: ac00a18dcf132180295d41299f31fbc68087a27b61782d00b9633dd9661ded2b

5 weeks agoFix a faulty assert() in rtree that could fire when processing an unusually large...
drh [Wed, 3 Jun 2026 16:58:01 +0000 (16:58 +0000)] 
Fix a faulty assert() in rtree that could fire when processing an unusually large record.

FossilOrigin-Name: 004d85c5f1bf04409ce85d5131f1d9697f25f531046e60160e78b0bae7f55123

5 weeks agoUse tail recursion on the larger of the two partitions when doing a
drh [Wed, 3 Jun 2026 16:23:45 +0000 (16:23 +0000)] 
Use tail recursion on the larger of the two partitions when doing a
quicksort as part of the implementation of the median() function,
to avoid excess stack usage on pathological inputs.

FossilOrigin-Name: b8fce837cf633af7e489e9750bcd1764e96f9ad7ea01847d5ef9c7060f01a4bf

5 weeks agoFix an integer overflow problem in fts3 that could lead to a buffer overwrite on...
drh [Wed, 3 Jun 2026 15:54:58 +0000 (15:54 +0000)] 
Fix an integer overflow problem in fts3 that could lead to a buffer overwrite on platforms where size_t is 32-bits.

FossilOrigin-Name: 1389ec7bf6a7f68406adae6fd532497b2496f01fb5b465e18bd683da3f8f53ad

5 weeks agoFix another buffer overread in fts5 that could occur when processing
drh [Wed, 3 Jun 2026 15:02:29 +0000 (15:02 +0000)] 
Fix another buffer overread in fts5 that could occur when processing
corrupt records.

FossilOrigin-Name: 8427cac76455ecbef224ceaccbb37b79338015bcfe67209ae462f36ffefa8466

5 weeks agoFix another potential buffer overrun that could occur in fts5 when
drh [Wed, 3 Jun 2026 14:24:19 +0000 (14:24 +0000)] 
Fix another potential buffer overrun that could occur in fts5 when
processing corrupt records.

FossilOrigin-Name: e583a723fa501d0c53ad124b571bcd6a42d76daba1ea983d3a547763c2c94c22

5 weeks agoFix a potential UAF bug in the zipfile extension.
drh [Wed, 3 Jun 2026 13:16:20 +0000 (13:16 +0000)] 
Fix a potential UAF bug in the zipfile extension.

FossilOrigin-Name: 46fbc23c16b3d104605f5abe5d7a5e779021e264bde409f2d9939de9b5cb9b37

5 weeks agoAvoid excessive recursion and stack overflow in fts3 when processing a corrupt
drh [Wed, 3 Jun 2026 12:04:07 +0000 (12:04 +0000)] 
Avoid excessive recursion and stack overflow in fts3 when processing a corrupt
database.

FossilOrigin-Name: c32ddb6a3fe2b8cd5f8a8a133bd2d4061243a3bc0e7e29a96b4d0e5e6090977f

5 weeks agoThe prefix_length() function should stop at the first NUL terminator.
drh [Wed, 3 Jun 2026 11:30:01 +0000 (11:30 +0000)] 
The prefix_length() function should stop at the first NUL terminator.

FossilOrigin-Name: b5f9dc646df5059e546ceb1404a62aadeff4a33163d9b3758e78a33ff3c23467

5 weeks agoMake the (unused, untested, and unsupported) ext/misc/compress.c routines
drh [Wed, 3 Jun 2026 11:05:22 +0000 (11:05 +0000)] 
Make the (unused, untested, and unsupported) ext/misc/compress.c routines
responsive to OOM conditions.

FossilOrigin-Name: 2d1dc1c6c679d920e4f5d79acefbf318183ef37bc65bc78dc50f8512f317c1f5

6 weeks agoUpdate the session module so that it can apply changesets containing two or more...
dan [Tue, 2 Jun 2026 18:23:55 +0000 (18:23 +0000)] 
Update the session module so that it can apply changesets containing two or more UPDATE changes that form a dependency loop - so that no single UPDATE can be applied independently without violating a constraint.

FossilOrigin-Name: 919d393a3bc483bf58be1f8d6c2ef70f570d63cc9ad8d8df6a6562fb270ea7e5

6 weeks agoMerge the latest branch-3.53 fixes into the reuse-schema-3.53 branch.
drh [Tue, 2 Jun 2026 17:22:20 +0000 (17:22 +0000)] 
Merge the latest branch-3.53 fixes into the reuse-schema-3.53 branch.

FossilOrigin-Name: 158991b8ff7824594b21a2f94df0b958e786d0fe0ebc3c0ddaf723ce6df7b088

6 weeks agoRemove a NEVER() that is actually reachable. This same NEVER() was removed
drh [Tue, 2 Jun 2026 13:44:21 +0000 (13:44 +0000)] 
Remove a NEVER() that is actually reachable.  This same NEVER() was removed
from trunk at check-in [0de3d95500b7ecd4].

FossilOrigin-Name: 46e74947f155199f5ce2440e8d5f19849d0daeb1d9d47381b0f84388901eab4c

6 weeks agoDisable transitive WHERE constraints when there are explicit COLLATE
drh [Mon, 1 Jun 2026 18:07:44 +0000 (18:07 +0000)] 
Disable transitive WHERE constraints when there are explicit COLLATE
operators.

FossilOrigin-Name: 4c0455efe57d1e3c27327e942a1509de3eb7b0902bc3b90473e2cba8df90139b

6 weeks agoFor expressions of the form "(x, y...) IN (SELECT a, b ...)" where the
drh [Mon, 1 Jun 2026 16:38:10 +0000 (16:38 +0000)] 
For expressions of the form "(x, y...) IN (SELECT a, b ...)" where the
result is not true, consider the collation sequences of columns "a" and "b"
when determinining if the result should be false or NULL.

FossilOrigin-Name: 5ceba3fe8d9fb2b1e44a048b6e010d427b7f464b727b58824a2af1b53d57f1ec

6 weeks agoFix a minor problem with test case mjournal-3.3.
drh [Mon, 1 Jun 2026 15:47:23 +0000 (15:47 +0000)] 
Fix a minor problem with test case mjournal-3.3.

FossilOrigin-Name: dc1cc4d908df0e36447d0422ecbbbb6d2f59c7b49243407f8a9602e7bb0d1a00

6 weeks agoDo not allow the argument to a table-valued function to reference a table
drh [Mon, 1 Jun 2026 13:48:25 +0000 (13:48 +0000)] 
Do not allow the argument to a table-valued function to reference a table
to its right, even if the SELECT is inside a common table expression.

FossilOrigin-Name: 27b4f821c752a65197746952cc168fab6a3aa0039d1a0100e3d8415225b5d4bf

6 weeks agoFix an integer overflow that could lead to a buffer overrun in the zipfile
drh [Mon, 1 Jun 2026 13:44:19 +0000 (13:44 +0000)] 
Fix an integer overflow that could lead to a buffer overrun in the zipfile
extension.

FossilOrigin-Name: ae9c99b904a8d1b9745a8f09cb35412e4107f4f24f95cabccc18a777b9e76bdf

6 weeks agoExtra defenses against integer overflows in the untested, unused, and
drh [Mon, 1 Jun 2026 13:39:15 +0000 (13:39 +0000)] 
Extra defenses against integer overflows in the untested, unused, and
unsupported transliterate() SQL extension function found in the
ext/misc/spellfix.c extension.

FossilOrigin-Name: ca800b1d2d243715426045df0d40ad171aed89182f4a5bb1055787964e74ff3c

6 weeks agoFix the zipfile extension so that ZIP archives containing files whose names
drh [Sun, 31 May 2026 15:52:29 +0000 (15:52 +0000)] 
Fix the zipfile extension so that ZIP archives containing files whose names
contain embedded \000 bytes do not cause problems.

FossilOrigin-Name: f6108e2fbdddfa03154a12efab17e5c1d681884ebcdfb6da5c319544601676ed

6 weeks agoFix the format() SQL function so that it reports TOOBIG and NOMEM errors.
drh [Sun, 31 May 2026 09:23:09 +0000 (09:23 +0000)] 
Fix the format() SQL function so that it reports TOOBIG and NOMEM errors.
Fix a possible integer overflow on %#Q formatting.

FossilOrigin-Name: cd0c6953cdc3b2952070d4150da9c773da193d6710f41455a5c9832cd944831a

6 weeks agoAdd a test to ensure an application does not try to create a geopoly
drh [Sat, 30 May 2026 13:25:49 +0000 (13:25 +0000)] 
Add a test to ensure an application does not try to create a geopoly
virtual table with too many columns.

FossilOrigin-Name: 00dc6063077080c7922c335f04bc1a34a7c8c8c3e85b8771c3133d264af3119e

6 weeks agoRemove the untested and undocumented "scrub" utility program. It was written
drh [Sat, 30 May 2026 10:15:58 +0000 (10:15 +0000)] 
Remove the untested and undocumented "scrub" utility program.  It was written
in 2016, but made obsolete by the VACUUM INTO command in 2019.

FossilOrigin-Name: 20c458172e0b09f7ada7f8cb8be95450c3988e620cbf6f174470bf8e78dcfbf0

6 weeks agoBe sure to do floating-point to text conversions in JSON to the full
drh [Fri, 29 May 2026 23:17:09 +0000 (23:17 +0000)] 
Be sure to do floating-point to text conversions in JSON to the full
17-digits.

FossilOrigin-Name: 9498dade8754909d6fadc8cdff44dafc7770d53a1984ba27a00317ecd7e2f3dd

6 weeks agoFix potential integer overflow in btree overflow page cache computation.
drh [Thu, 28 May 2026 10:18:42 +0000 (10:18 +0000)] 
Fix potential integer overflow in btree overflow page cache computation.

FossilOrigin-Name: 093e23814e35f0cd0a4bded29b79ddecd7835626d9fe627bfbf4eb138403277f

7 weeks agoFix a potential 1-byte overread in sqlite3changeset_invert() when
drh [Tue, 26 May 2026 15:09:07 +0000 (15:09 +0000)] 
Fix a potential 1-byte overread in sqlite3changeset_invert() when
processing a corrupt buffer.

FossilOrigin-Name: 69554ec4e8354e8573071bc423e2dbd0059058388481be3e76fcb7c0fc1ff467

7 weeks agoFix a 32-bit integer overflow in sqlite3changegroup_change_blob() that
drh [Tue, 26 May 2026 14:23:36 +0000 (14:23 +0000)] 
Fix a 32-bit integer overflow in sqlite3changegroup_change_blob() that
could lead to a buffer overwrite.

FossilOrigin-Name: f2a8ae2251561f2255c2974914293647cf304c6db79de9da957755fccaf8a8b6

7 weeks agoFix QRF so that it works sensibly with "--wrap 1"
drh [Tue, 26 May 2026 13:57:36 +0000 (13:57 +0000)] 
Fix QRF so that it works sensibly with "--wrap 1"

FossilOrigin-Name: 90eb6c22687449441824c7da5741a31e78bb78098c170382b230e851d03212c0

7 weeks agoStrength the defense against malicious command-line arguments in the
drh [Tue, 26 May 2026 11:46:58 +0000 (11:46 +0000)] 
Strength the defense against malicious command-line arguments in the
sqlite3_rsync utility program.

FossilOrigin-Name: a8d18783fb2dbe9683bb6f3b57ebb3cc3ccf1e5afdd5e14786abf1e4e240f51a

7 weeks agoFix HTML ">" quoting in QRF.
drh [Mon, 25 May 2026 23:47:05 +0000 (23:47 +0000)] 
Fix HTML ">" quoting in QRF.

FossilOrigin-Name: f6b35a9b5fc38245414f1bea9bc3c81b57f774711e77ab32fb91c984370ed5e9

7 weeks agoEnhance the defenses against malformed JSONB in the jsonbPayloadSize()
drh [Mon, 25 May 2026 18:53:35 +0000 (18:53 +0000)] 
Enhance the defenses against malformed JSONB in the jsonbPayloadSize()
routine.

FossilOrigin-Name: 73dfb252f86807464642037df6ec7353b5b52d8c447837c7c4a6540ec622f29d

7 weeks agoFix a potential 1 byte overwrite that could occur when processing
drh [Mon, 25 May 2026 18:50:36 +0000 (18:50 +0000)] 
Fix a potential 1 byte overwrite that could occur when processing
a carefully crafted super-journal file.

FossilOrigin-Name: f654fa5ac938bb61d917fc33298052f5bd7a6e5e33b0539ac15cbd45bec023d3

7 weeks agoFix a potential buffer overwrite that could occur when in fts5 when handling corrupt...
drh [Mon, 25 May 2026 17:23:58 +0000 (17:23 +0000)] 
Fix a potential buffer overwrite that could occur when in fts5 when handling corrupt records.

FossilOrigin-Name: 02733fc4bc27df64b50ca5027ac94fc643146efb24bb4fdbcc70c45e1c58c919

7 weeks agoFix the VFSes so that there is no 32-bit integer overflow in the
drh [Thu, 21 May 2026 15:27:55 +0000 (15:27 +0000)] 
Fix the VFSes so that there is no 32-bit integer overflow in the
xShmMap method if the WAL file size exceeds about 25 terabytes, or
if the header is corrupted to make SQLite think that the WAL file size
is that big.

FossilOrigin-Name: 39a72dbe53c94be6784fa042cf093151eff43d67086449a4da975416adde120a

7 weeks agoLimit the length of inputs to the spellfix1_editdist() extension
drh [Thu, 21 May 2026 13:39:43 +0000 (13:39 +0000)] 
Limit the length of inputs to the spellfix1_editdist() extension
function (not part of the standard SQLite build and rarely used)
to 99999 characters, to avoid any possibility of integer overflow.

FossilOrigin-Name: e56ac902fa4f1219d3affbe3ac9f822406a58486e456f0200a5d0f47fa4e5b43

7 weeks agoA join constraint is not an equivalence unless both operands have the
drh [Thu, 21 May 2026 13:06:04 +0000 (13:06 +0000)] 
A join constraint is not an equivalence unless both operands have the
same collation.

FossilOrigin-Name: 4247f48eec004c311cb046b1e97fbd44bc35d4b09e33c2b930dd3e1baabdb813

7 weeks agoFix a bug causing the session module to dereference a NULL pointer when applying...
drh [Wed, 20 May 2026 15:29:37 +0000 (15:29 +0000)] 
Fix a bug causing the session module to dereference a NULL pointer when applying a corrupt changeset.

FossilOrigin-Name: c813d9b777bedd58005b53d38fa3c235ca56bd57b76424cf9238c01a977a4b3d

7 weeks agoCheck-in [0d01c90bd7779192] was incomplete in that it did not remove
drh [Wed, 20 May 2026 11:59:36 +0000 (11:59 +0000)] 
Check-in [0d01c90bd7779192] was incomplete in that it did not remove
the incorrect assert() statement.  Fixed here.

FossilOrigin-Name: 2e9bb51ae951c421f7e5ed8e55fd6dca8b7d4b8543fd3ba3a9e9f017592c028b

7 weeks agoAvoid returning an SQLITE_SCHEMA error from within sqlite3session_diff() if the schem...
drh [Wed, 20 May 2026 11:56:17 +0000 (11:56 +0000)] 
Avoid returning an SQLITE_SCHEMA error from within sqlite3session_diff() if the schema has been recently modified.

FossilOrigin-Name: 15fb7ffe4be49d5242c47bef1b3cad5c923cd7f500896058db4dd257bc7b3924

7 weeks agoIncrease the patch level to 3.53.2
drh [Wed, 20 May 2026 10:04:04 +0000 (10:04 +0000)] 
Increase the patch level to 3.53.2

FossilOrigin-Name: 076d214410fc8aba38c7ada60a985adc6773e51a13add19cbd07a91375b483fd

7 weeks agoFix a potential buffer overread in fts5 that could occur when handling
drh [Wed, 20 May 2026 10:01:25 +0000 (10:01 +0000)] 
Fix a potential buffer overread in fts5 that could occur when handling
corrupt records.  Improved detection of corrupt fts5 records.

FossilOrigin-Name: fad98805b7d73abf0cf17919397ac50757a2b888354fcf42b72640a12f32926c

7 weeks agoSilently ignore nested porter tokenizers in FTS5. Having nested porter
drh [Wed, 20 May 2026 09:36:42 +0000 (09:36 +0000)] 
Silently ignore nested porter tokenizers in FTS5.  Having nested porter
tokenizers is pointless, but it does use stack space unnecessarily.

FossilOrigin-Name: 8207ca671e1253135e5e36cd123fdcfb4d1f0fcf939d2c94238425fafd38c75a

8 weeks agoPrevent integer overflow in the ICU extension.
drh [Tue, 19 May 2026 18:59:39 +0000 (18:59 +0000)] 
Prevent integer overflow in the ICU extension.

FossilOrigin-Name: 42ef6f3f4fbe9fce3312259855df53d89e002adb0cf798c4aad074a8b7e988d5