]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
15 hours agoAdd 'reconfigure' target to Makefile.in to re-run the configure script with the same... master
stephan [Fri, 4 Jul 2025 18:32:18 +0000 (18:32 +0000)] 
Add 'reconfigure' target to Makefile.in to re-run the configure script with the same flags it was generated with.

FossilOrigin-Name: c60907e77b32824aaaf024d299cdaf161b5f64fc927ffe5d5455eeb5754e6b01

16 hours agoPropagate the -ldl and -lpthread flags, if needed, into sqlite3.pc, per request in...
stephan [Fri, 4 Jul 2025 17:20:37 +0000 (17:20 +0000)] 
Propagate the -ldl and -lpthread flags, if needed, into sqlite3.pc, per request in [forum:44a58c807353162f | forum post 44a58c807353162f].

FossilOrigin-Name: 64f5f14322349b47451b8cac03bf8cd6f1ae45a8822e7f1ddee3d0b265047501

21 hours agoFix harmless compiler warnings.
drh [Fri, 4 Jul 2025 12:25:24 +0000 (12:25 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 13af4acebe09b047756c22b800136cffaba532e7fcaa448a4edf4fedb94e9bbc

22 hours agoRemove an ALWAYS() added by [960a8e6fc91f4] that turns out to be false
drh [Fri, 4 Jul 2025 11:48:11 +0000 (11:48 +0000)] 
Remove an ALWAYS() added by [960a8e6fc91f4] that turns out to be false
in some cases of malformed SQL.

FossilOrigin-Name: cc8171461bf35f584888a24b844c8b79ad30155b19b61161e9f3abc276e8aae5

41 hours agoFix a few cases where LIMIT clauses that were part of scalar sub-queries on virtual...
dan [Thu, 3 Jul 2025 16:05:41 +0000 (16:05 +0000)] 
Fix a few cases where LIMIT clauses that were part of scalar sub-queries on virtual tables were not being passed to xBestIndex methods correctly.

FossilOrigin-Name: 960a8e6fc91f47add3a089dc6cef013109deadf809994c5149ad3bdfb3884de0

42 hours agoImprovements to sqlite3_vtab_rhs_value() logging in the vtab-limit-fixes
drh [Thu, 3 Jul 2025 15:50:18 +0000 (15:50 +0000)] 
Improvements to sqlite3_vtab_rhs_value() logging in the
ext/misc/vtablog.c extension.

FossilOrigin-Name: 25131ee84f53dab1191e02c19cefd256aed2828c7edea325fcc0ba3b0a668583

42 hours agoMake the value of an explicit LIMIT clause on a scalar sub-query available to xBestIn...
dan [Thu, 3 Jul 2025 15:32:27 +0000 (15:32 +0000)] 
Make the value of an explicit LIMIT clause on a scalar sub-query available to xBestIndex for simple "LIMIT 0" and "LIMIT 1" queries.

FossilOrigin-Name: 33b6a63caafccc61b3193714911cd8b5dd9b7f1798054b8c7845b23688d531f2

43 hours agoMake handling of LIMIT clauses in correlated sub-queries on virtual tables more effic...
dan [Thu, 3 Jul 2025 14:28:47 +0000 (14:28 +0000)] 
Make handling of LIMIT clauses in correlated sub-queries on virtual tables more efficient.

FossilOrigin-Name: 7214cb2a5b35190a06a1040cd4c54f325d347f8d8e36a07fd76c0a421e266522

43 hours agoEnhancements to the xBestIndex output from the ext/misc/vtablog.c
drh [Thu, 3 Jul 2025 14:10:03 +0000 (14:10 +0000)] 
Enhancements to the xBestIndex output from the ext/misc/vtablog.c
extension.

FossilOrigin-Name: 8b31acc0b18f38eb4af6efebd1ea25cd65a146651101579aee20afd9ec6dc2de

46 hours agoFix an uninitialized variable added yesterday by [d27d34fb746280e7].
drh [Thu, 3 Jul 2025 11:52:17 +0000 (11:52 +0000)] 
Fix an uninitialized variable added yesterday by [d27d34fb746280e7].
This problem was discovered overnight by
[https://github.com/google/oss-fuzz|OSSFuzz].

FossilOrigin-Name: 6db4703f1178fc808f3a75c355fb6638fb12c88f6e1ce7f579e200ced8089114

2 days agoImprove the bytecode for joins such that it exits earlier if it determines
drh [Wed, 2 Jul 2025 11:47:54 +0000 (11:47 +0000)] 
Improve the bytecode for joins such that it exits earlier if it determines
that no output is possible.

FossilOrigin-Name: 2d2b61cba44a756a3a41ef5c95bbb0c0b7111f4b679c578fec9bd0b214cca367

3 days agoEnsure that Expr.op2 values for TK_AGG_FUNCTION nodes are adjusted when
drh [Wed, 2 Jul 2025 02:03:43 +0000 (02:03 +0000)] 
Ensure that Expr.op2 values for TK_AGG_FUNCTION nodes are adjusted when
query flattening.

FossilOrigin-Name: d27d34fb746280e7e81335db4e195914b15403ef0da7b2955550553dd78fbe9a

3 days agoImproved comments on bytecode used to implement aggregate queries, to aid
drh [Tue, 1 Jul 2025 23:17:36 +0000 (23:17 +0000)] 
Improved comments on bytecode used to implement aggregate queries, to aid
in debugging.

FossilOrigin-Name: a1a8b85cdba64a17dcdcd4e6b42b872957cec2dc05b0ac34dfcd82f59344034b

3 days agoImproved byte-code comments for the short-circuit optimization of
drh [Tue, 1 Jul 2025 20:32:45 +0000 (20:32 +0000)] 
Improved byte-code comments for the short-circuit optimization of
[0083d5169a46104a], to aid in debugging.

FossilOrigin-Name: 113f9d10e347eeaa893ff8b47a461009e0b12589374b93cf3e0bddd19c702dea

3 days agoCache and reuse virtual table cursors in the bytecode engine.
drh [Tue, 1 Jul 2025 17:36:55 +0000 (17:36 +0000)] 
Cache and reuse virtual table cursors in the bytecode engine.

FossilOrigin-Name: 2d187d4232d750cb1840f1d89c8aed65962cb0883c1d7f91c554b451e475c514

3 days agoAvoid an assert() failure in fts5 that may occur when processing corrupt records.
dan [Tue, 1 Jul 2025 16:21:47 +0000 (16:21 +0000)] 
Avoid an assert() failure in fts5 that may occur when processing corrupt records.

FossilOrigin-Name: 8afd6ca85724a69970181042d6aac53742ea2b76ded5966b2541c3afe1121fb9

3 days agoMerge trunk fixes into the empty-table-optimizations branch.
drh [Tue, 1 Jul 2025 15:13:37 +0000 (15:13 +0000)] 
Merge trunk fixes into the empty-table-optimizations branch.

FossilOrigin-Name: 63306e447efb3ac17e789a331ed3bb65459eb8b79d66e9c185ba3bd852f34ce3

3 days agoWhen attempting to optimize "expr AND false" to "false" and
drh [Tue, 1 Jul 2025 12:43:13 +0000 (12:43 +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.
See [forum:/forumpost/f4878de3e7dd4764|forum thread f4878de3e7].

FossilOrigin-Name: 77397bd67d918db57d5ac545d6d963194806fdabcdaa8f822b6b09e4cfe8b715

4 days agoMore aggressive optimization of addrHalt for RIGHT JOIN.
drh [Mon, 30 Jun 2025 21:07:08 +0000 (21:07 +0000)] 
More aggressive optimization of addrHalt for RIGHT JOIN.

FossilOrigin-Name: 5e51d1c0dfcafef9e71c99de3f626dee157c935724b84c6e0c630299a880446f

4 days agoCompute WhereLevel.addrBrk and .addrHalt early so that those labels can be
drh [Mon, 30 Jun 2025 20:19:19 +0000 (20:19 +0000)] 
Compute WhereLevel.addrBrk and .addrHalt early so that those labels can be
used to abort loops early.  Use this to improve performance on two more
of the cases described by [forum:/forumpost/52651713ac|forum post 52651713ac].

FossilOrigin-Name: 6fc0b9ac23be6840542982de4bb282ebca1db8b5ab3baefdde95a997c1506e81

4 days agoStrive to skip the evaluation of scalar subqueries that are part of a
drh [Mon, 30 Jun 2025 16:41:40 +0000 (16:41 +0000)] 
Strive to skip the evaluation of scalar subqueries that are part of a
larger expression if the result from the scalar subquery does not change the
result of the overall expression.

FossilOrigin-Name: 0083d5169a46104a25355bdd9d5a2f4027b049191ebda571dd228477ec217296

4 days agoFor all binary operators, try to avoid computing subquery operands if the optimize-null-values
drh [Mon, 30 Jun 2025 12:14:47 +0000 (12:14 +0000)] 
For all binary operators, try to avoid computing subquery operands if the
other operand is NULL.

FossilOrigin-Name: d86eb16283c4b573c506d4faa422d5d9aeb6abc279d8e6a8e2104737162d417f

4 days agoSlightly smaller and faster version of the previous check-in.
drh [Mon, 30 Jun 2025 11:04:55 +0000 (11:04 +0000)] 
Slightly smaller and faster version of the previous check-in.

FossilOrigin-Name: f6e6fd02f4ad49c390a2d3c9626d57f9b2fff1f67eb361b30074cc1f5121810e

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

FossilOrigin-Name: b48d95191662e09659b5b55ae65cd462c9e1700c4f92dd9d40b59548f0797c02

4 days agoFactor out the code that tries to avoid evaluating subquery operands if the
drh [Mon, 30 Jun 2025 10:30:47 +0000 (10:30 +0000)] 
Factor out the code that tries to avoid evaluating subquery operands if the
other operand is NULL into a subroutine, so that it can be more easily reused
by other parts of the code generator.

FossilOrigin-Name: 3c6c71bcea16443b82234414137dfa1b59e2ee8fe5097906c738fc1228fec4e6

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

FossilOrigin-Name: c7cf9dcb69ce558ba6b81b2787f92ed7383e37f08b199faeb14f7adb4e494532

6 days agoImprove the bytecode generated for comparisons so that if one operand is
drh [Sat, 28 Jun 2025 17:59:15 +0000 (17:59 +0000)] 
Improve the bytecode generated for comparisons so that if one operand is
a subquery and the other operand evaluates to NULL, the subquery operand
is not even computed.  This fixes 5 of the 12 slow queries described
in [forum:/forumpost/52651713ac|forum post 52651713ac].

FossilOrigin-Name: f147bc04776ac0056412f69dfc518016c0d5b4e9d964664e3d88f595fb29dbe0

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

FossilOrigin-Name: 5508b56fd24016c13981ec280ecdd833007c9d8dd595edb295b984c2b487b5c8

7 days agoAPI doc typo fixes and closing DD element tags from brickviking.
stephan [Fri, 27 Jun 2025 12:46:50 +0000 (12:46 +0000)] 
API doc typo fixes and closing DD element tags from brickviking.

FossilOrigin-Name: c9ddd15b0197e6e5c5a74581d94cf986523514ffdb28c66ba18de9a22aec97e9

8 days agoWork around an apparent GCC UBSAN bug. See
drh [Thu, 26 Jun 2025 18:57:20 +0000 (18:57 +0000)] 
Work around an apparent GCC UBSAN bug.  See
[forum:/forumpost/1d7c25d4a2d6f5e2|forum thread 1d7c25d4a2d] for details.

FossilOrigin-Name: 23056532e51abcff486e38a3319545e6663b4a855abe1bc443e2cd7e0473748c

9 days agoMinor API doc fixes sent off-list from brickviking.
stephan [Wed, 25 Jun 2025 20:42:40 +0000 (20:42 +0000)] 
Minor API doc fixes sent off-list from brickviking.

FossilOrigin-Name: cb4d05633a0c9cdf146f3108e1b4b10754cd79d72a425d8cc9cd21836037a01b

10 days agoSimilar fix to the previous check-in, but this time for
drh [Tue, 24 Jun 2025 18:27:59 +0000 (18:27 +0000)] 
Similar fix to the previous check-in, but this time for
sqlite3_preupdate_new().

FossilOrigin-Name: 9aaff764d508cbd9823f23cdf0c510255721bc5c09be481ebc60bd8902ceb8c5

10 days agoRange check the column index on the sqlite3_preupdate_old() interface
drh [Tue, 24 Jun 2025 15:58:32 +0000 (15:58 +0000)] 
Range check the column index on the sqlite3_preupdate_old() interface
and return SQLITE_MISUSE if too large.
[forum:/forumpost/b617e497287235d0|Forum post b617e49728].

FossilOrigin-Name: 6a5701e6c7be25cba93e55438f950966e1dacb32eb2b23a8acc8ac53da6f0a85

11 days agoAPI doc typo fixes and one rephrasing improvement from brickviking.
stephan [Tue, 24 Jun 2025 07:38:52 +0000 (07:38 +0000)] 
API doc typo fixes and one rephrasing improvement from brickviking.

FossilOrigin-Name: 85e8060c4701a601d4bc8a639acd268ee4f2736193820d55ecd9b8abf864132f

11 days agoImprove some of the error messages emitted by fts5 when it encounters corruption.
dan [Mon, 23 Jun 2025 19:38:22 +0000 (19:38 +0000)] 
Improve some of the error messages emitted by fts5 when it encounters corruption.

FossilOrigin-Name: 48044a6b57c0a16cb75139c103ad88ca4ab64d74f70a3dee0d8b817fbfbec3c6

11 days agoFix an SQL typo introduced by the previous check-in.
drh [Mon, 23 Jun 2025 19:00:30 +0000 (19:00 +0000)] 
Fix an SQL typo introduced by the previous check-in.

FossilOrigin-Name: 72a81d247bc74a21d077d311969ac585d0f26bffbd210ec60f03c38bf138790e

11 days agoEscape the "_" character in LIKE patterns in the CLI.
drh [Mon, 23 Jun 2025 16:51:33 +0000 (16:51 +0000)] 
Escape the "_" character in LIKE patterns in the CLI.
[forum:/forumpost/6a89702f5d|Forum post 6a89702f5d].

FossilOrigin-Name: cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a

11 days agoFix a harmless compiler warning injected by [c978aed3b6f82b3d].
drh [Mon, 23 Jun 2025 13:42:59 +0000 (13:42 +0000)] 
Fix a harmless compiler warning injected by [c978aed3b6f82b3d].

FossilOrigin-Name: f46500247b3a2f8b4a2f0f032cc4066af9cb3918e38a09c59db0a1da5747a25c

11 days agoImproved "statement aborts at ..." log-file messages that identify the
drh [Mon, 23 Jun 2025 13:28:13 +0000 (13:28 +0000)] 
Improved "statement aborts at ..." log-file messages that identify the
trigger that caused the abort.

FossilOrigin-Name: 7691264fe37300c880d612c91cf093327841fbe85fb7ec67e777e911d2cfc9ee

12 days agoAdd the --disable-rpath configure script flag to address [forum:13cac3b56516f849...
stephan [Sun, 22 Jun 2025 22:48:11 +0000 (22:48 +0000)] 
Add the --disable-rpath configure script flag to address [forum:13cac3b56516f849 | forum post 13cac3b56516f849].

FossilOrigin-Name: a59d9bb25e518f5d79f654615b92f6c50cfb704b5abee0f820912644b89366c5

12 days agoAPI doc typo fixes from brickviking.
stephan [Sun, 22 Jun 2025 12:04:47 +0000 (12:04 +0000)] 
API doc typo fixes from brickviking.

FossilOrigin-Name: 18e07f8f53693d0dace3c4025a572c1a10582290a338aa7f0913c83842a69b05

13 days agoMinor JS test cleanups prompted by a linter.
stephan [Sat, 21 Jun 2025 16:33:05 +0000 (16:33 +0000)] 
Minor JS test cleanups prompted by a linter.

FossilOrigin-Name: 764235a3d15fda55af85ebe3b5885fa27336cc0e979f1be2f6770b66a84bbe87

13 days agoRemove some duplicated JS tests.
stephan [Sat, 21 Jun 2025 16:18:23 +0000 (16:18 +0000)] 
Remove some duplicated JS tests.

FossilOrigin-Name: d1cb9ed79d806f667c22f5ba9861451d4d0765aa3072e085831045cf3a39f8b4

13 days agoReduce the maximum --size flag for JS kvvfs speedtest1 from 4 to 2, as --size 3 and...
stephan [Sat, 21 Jun 2025 16:02:20 +0000 (16:02 +0000)] 
Reduce the maximum --size flag for JS kvvfs speedtest1 from 4 to 2, as --size 3 and 4 are overflowing the kvvfs storage limits.

FossilOrigin-Name: b77b3adc828ce543e880e230701edd5e0ccb681e4c3c724ea8ad5ecbd69c73a6

13 days agoGive oo1.Stmt.get() similar treatment to [8c187140a60b]. This is an internal change...
stephan [Sat, 21 Jun 2025 15:58:20 +0000 (15:58 +0000)] 
Give oo1.Stmt.get() similar treatment to [8c187140a60b]. This is an internal change only - the API is unaffected.

FossilOrigin-Name: f5a7abc0a447273de40dacc463d267d26d4b62be56ee15baf05825791c2a7a6e

13 days agoExtend the SEE-via-kvvfs tests to include all three key types.
stephan [Sat, 21 Jun 2025 15:38:59 +0000 (15:38 +0000)] 
Extend the SEE-via-kvvfs tests to include all three key types.

FossilOrigin-Name: fc001aa5ee978795c2ff670bea64db0b69b6bde98653769d9cede8825a28e698

13 days agoRework how JS's oo1.DB.exec() flags its Stmt objects to make certain Stmt APIs illega...
stephan [Sat, 21 Jun 2025 14:38:53 +0000 (14:38 +0000)] 
Rework how JS's oo1.DB.exec() flags its Stmt objects to make certain Stmt APIs illegal (i.e. throwing) if called while that Stmt is being step()ped by DB.exec() (which can happen via client-provided per-result-row callbacks). This is an internal change only - the API is unaffected. Remove some unrelated dead code.

FossilOrigin-Name: 8c187140a60b62dc3b6066b8615766d52b7a29a5de992cbb6d312dbb225a980b

2 weeks agoNumerous small doc typo from BrickViking.
stephan [Sat, 21 Jun 2025 06:07:13 +0000 (06:07 +0000)] 
Numerous small doc typo from BrickViking.

FossilOrigin-Name: 3aab4415de615c178205936372c625bb571bad1016c3d2e7bb2a45932356f3d6

2 weeks agoEnhance sqlite3BtreeSetPageSize() so that it detects early if no changes
drh [Fri, 20 Jun 2025 13:12:55 +0000 (13:12 +0000)] 
Enhance sqlite3BtreeSetPageSize() so that it detects early if no changes
are needed and exists with SQLITE_OK.

FossilOrigin-Name: c978aed3b6f82b3d9d2e0ca0283c611351bca5e5496e86a9d5d0731ebcd27c84

2 weeks agoFix an out-of-order local variable declaration in ext/misc/fileio.c.
drh [Thu, 19 Jun 2025 20:19:12 +0000 (20:19 +0000)] 
Fix an out-of-order local variable declaration in ext/misc/fileio.c.

FossilOrigin-Name: a88bb75288a06492a04ab1278e8a2101a74f4ba712d328b4c73e86ac01cb946d

2 weeks agoImprove the accuracy of sqlite3BtreeRowCountEst().
drh [Thu, 19 Jun 2025 20:00:37 +0000 (20:00 +0000)] 
Improve the accuracy of sqlite3BtreeRowCountEst().

FossilOrigin-Name: e553fb538ec1527457e2927edf9127dccf268a8a3b5918d4fb0d066ad9676094

2 weeks agoGeneralize the indexCellCompare() so that works on any index page, not just
drh [Thu, 19 Jun 2025 19:33:06 +0000 (19:33 +0000)] 
Generalize the indexCellCompare() so that works on any index page, not just
the current page that a cursor is pointing to.

FossilOrigin-Name: b305a7f5db183d8e0e5d62ca3c9c6260ad94bb954f7342bd3caabcd8308a21f5

2 weeks agoA slight doc rephrasing for clarity, suggested in the forum.
stephan [Thu, 19 Jun 2025 12:35:30 +0000 (12:35 +0000)] 
A slight doc rephrasing for clarity, suggested in the forum.

FossilOrigin-Name: 0d6084a398edb013fcfb613eff8d75e2f86cbb5e3c8049328ede89e75db93cb3

2 weeks agoDoc typo fixes from [forum:0bce273669 | forum post 0bce273669].
stephan [Thu, 19 Jun 2025 10:46:39 +0000 (10:46 +0000)] 
Doc typo fixes from [forum:0bce273669 | forum post 0bce273669].

FossilOrigin-Name: 8f97e3f00d24b26fe87a9d3396ad855277a1a369f6f89e9c77dc9af4d203bdf1

2 weeks agoExpose the column metadata APIs to WASM (which does not require a non-default sqlite3...
stephan [Thu, 19 Jun 2025 10:25:50 +0000 (10:25 +0000)] 
Expose the column metadata APIs to WASM (which does not require a non-default sqlite3.c build, contrary to my prior mistaken claims). This adds only 424 bytes to sqlite3.wasm and 660 bytes to sqlite3.js.

FossilOrigin-Name: 3cf983816ccd167d93cb39c7a16b6db4b4f7ef2a64f4181d3bc4530cd0bd3b67

2 weeks agoExtend the pedantic enforcement of type to VIRTUAL columns.
drh [Wed, 18 Jun 2025 19:04:28 +0000 (19:04 +0000)] 
Extend the pedantic enforcement of type to VIRTUAL columns.

FossilOrigin-Name: b734c74e55acb26eb61b60937bef870f4b55b2e2e7560a22362f5f31ba2fcd03

2 weeks agoEnforce judgmental typing on STORED generated columns for STRICT
drh [Wed, 18 Jun 2025 16:17:00 +0000 (16:17 +0000)] 
Enforce judgmental typing on STORED generated columns for STRICT
tables.  [forum:/forumpost/6caf195248a849e4|Forum post 6caf195248].

FossilOrigin-Name: 5e9279bff0482806f86657ae05ca3e916708d138bc3c3ceb3fbf454818649d44

2 weeks agoExport the column-metadata APIs to WASM. Doing so requires a non-default build of... wasm-column-metadata
stephan [Wed, 18 Jun 2025 15:37:04 +0000 (15:37 +0000)] 
Export the column-metadata APIs to WASM. Doing so requires a non-default build of sqlite3.c, so this is a proof-of-concept branch saved just in case SQLITE_ENABLE_COLUMN_METADATA ever becomes the default for sqlite3.c.

FossilOrigin-Name: 59db3f639d1073678805dea26a4686eddfb238f055aa90bd429fc7fd33241502

2 weeks agoAdd the --enable-column-metadata flag to the configure script (off by default). It...
stephan [Wed, 18 Jun 2025 15:22:50 +0000 (15:22 +0000)] 
Add the --enable-column-metadata flag to the configure script (off by default). It's only available in the canonical build, not the autoconf build, because it changes how sqlite3.c gets generated.

FossilOrigin-Name: 986b601db11a041d280eb61004723604bf4b6fd573b9832c97e3a9da9ea16e9a

2 weeks agoEliminate configure/build discrepancies in how 'make tclextension-...' works vs other...
stephan [Wed, 18 Jun 2025 14:17:18 +0000 (14:17 +0000)] 
Eliminate configure/build discrepancies in how 'make tclextension-...' works vs other makefile-side handling of the extension, conforming to the former.

FossilOrigin-Name: 7ca545fd3b460fcf92e117baef42655eb6e78ebb5bdc6302f8f1b5b8446c0a06

2 weeks agoChange the definition of SQLITE_DYNAMIC to a function that has exactly
drh [Wed, 18 Jun 2025 14:14:46 +0000 (14:14 +0000)] 
Change the definition of SQLITE_DYNAMIC to a function that has exactly
the same type as sqlite3_destructor_type, in an effort to work around
possible legacy compiler bugs.

FossilOrigin-Name: 83553edf78c35d171a0ddf1a51306e963d715e56d95b8159b561b729cfb27843

2 weeks agoAdd the --tclConfig.sh FILE flag to buildtclext.tcl to eliminate the discrepancy...
stephan [Wed, 18 Jun 2025 11:11:30 +0000 (11:11 +0000)] 
Add the --tclConfig.sh FILE flag to buildtclext.tcl to eliminate the discrepancy between the configure-time-detected tclConfig.sh and the one auto-detected by the tclextension family of makefile targets. Add the tclextension-all target to run all of the various tclextension-... targets in their natural order to facilitate testing changes like this one. Update the --help text to note that --with-tclsh should only be used if there's a specific need, and that --with-tcl is generall preferred. This is in response to [https://github.com/termux/termux-packages/issues/23268 | Termux ticket 23268].

FossilOrigin-Name: 928976abcb11f9d5abe1f7631002592c4af7bf83ecadba5b0763866d039c2270

2 weeks agotea: remove the vsatisfies 8.6- enforcement from the extension because at least one...
stephan [Tue, 17 Jun 2025 20:50:51 +0000 (20:50 +0000)] 
tea: remove the vsatisfies 8.6- enforcement from the extension because at least one platform with tcl 8.6 is inexplicably failing it. [forum:fde857fb8101a4be | Forum post fde857fb8101a4be]

FossilOrigin-Name: 7331e32a76a8a41cc1bd1c84069219c9929e0e0f941c1d9e308cbbb7959373c5

2 weeks agoAvoid writing frames with no checksums into the wal file if a
drh [Tue, 17 Jun 2025 19:10:33 +0000 (19:10 +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.

FossilOrigin-Name: 5973f9b9aa828ec9274b02a124b95f452c58235eaafffbdda1c32b4ae2d5616d

2 weeks agoFix a corner-case for [9441fff52cc4e19c].
drh [Tue, 17 Jun 2025 18:57:07 +0000 (18:57 +0000)] 
Fix a corner-case for [9441fff52cc4e19c].

FossilOrigin-Name: 336a59eb3afd80ce048de472368df6dfc32934ee783859d37663ed8f5cf169a5

2 weeks agoUpdate walcksum.test so that it works with SQLITE_DEFAULT_AUTOVACUUM=1 builds. forum-b490f726db-fix
dan [Tue, 17 Jun 2025 18:17:09 +0000 (18:17 +0000)] 
Update walcksum.test so that it works with SQLITE_DEFAULT_AUTOVACUUM=1 builds.

FossilOrigin-Name: 0da16f6c625bff9f2ca5624afa6dce6b5a157f44c1d56b25b92946c13217ab02

2 weeks agoExtend [b5c6cb13cff5] to use a wildcard on darwin* because some OSes report a version...
stephan [Tue, 17 Jun 2025 17:15:12 +0000 (17:15 +0000)] 
Extend [b5c6cb13cff5] to use a wildcard on darwin* because some OSes report a version number in the suffix. [forum:0c4bbc2962dfb06e | Forum post 0c4bbc2962dfb06e].

FossilOrigin-Name: d960bd6f9256410ebc98125b0567380457e39bc8fe768fcd9ea05c6de1994df6

2 weeks agoMinor proj.tcl portability fixes and cleanups suggested in [forum:7b218c3c9f|forum...
stephan [Tue, 17 Jun 2025 14:56:30 +0000 (14:56 +0000)] 
Minor proj.tcl portability fixes and cleanups suggested in [forum:7b218c3c9f|forum post 7b218c3c9f]. Tested on Linux, Msys, Cygwin, and Haiku.

FossilOrigin-Name: b5c6cb13cff53f4ba1e0e6a0d61389252bd004d9099727e7a9304217e3f81d80

2 weeks agoproj.tcl portability fixes and cleanups suggested in [forum:7b218c3c9f|forum post... linux-named-apple
stephan [Tue, 17 Jun 2025 14:37:31 +0000 (14:37 +0000)] 
proj.tcl portability fixes and cleanups suggested in [forum:7b218c3c9f|forum post 7b218c3c9f]. Branching so that it can be tested on msys/cygwin/haiku before committing to it.

FossilOrigin-Name: 89552e9137b7ebba9600443720e936e8dc4f7ab021d2ac3f0bb01b74071e130c

2 weeks agoAvoid writing frames with no checksums into the wal file if a savepoint is rolled...
dan [Tue, 17 Jun 2025 11:36:39 +0000 (11:36 +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. Possible fix for [forum:/forumpost/b490f726db | forum post b490f726db].

FossilOrigin-Name: 3a3269fe8e925a522d5df9f011220a842fb15a9f56e785884e32d2e15abda5bb

2 weeks agoFix an issue going back to version 3.39.0 with transitive IS constraints
drh [Mon, 16 Jun 2025 17:36:11 +0000 (17:36 +0000)] 
Fix an issue going back to version 3.39.0 with transitive IS constraints
in queries that make use of RIGHT JOIN.  Problem reported by
[forum:/forumpost/68f29a2005|forum post 68f29a2005].

FossilOrigin-Name: 9441fff52cc4e19c44df1a77ffe474f409d519b270c7166ce17f99e6ea48fc1e

2 weeks agoImproved debugging output for the transitive constraint optimization.
drh [Mon, 16 Jun 2025 16:07:14 +0000 (16:07 +0000)] 
Improved debugging output for the transitive constraint optimization.

FossilOrigin-Name: 94b53c20e9bc8687c44272419aa7a93076eebdeae9a4f50b95b96a49993f9c0d

2 weeks agoMake the show-%p-az-zero hack of the previous check-in configurable at
drh [Mon, 16 Jun 2025 15:34:26 +0000 (15:34 +0000)] 
Make the show-%p-az-zero hack of the previous check-in configurable at
run-time using the 0x100000 bit of either .treetrace or .wheretrace.
As before, this is all a no-op except for debugging builds.

FossilOrigin-Name: a29627d7e7f8344d9a099cc133bda85250b02dc5ee5f358ba59691e0816b5b2d

2 weeks agoAdd an "#if 0" that can be changed to "1" to cause all %p output to render
drh [Mon, 16 Jun 2025 13:51:09 +0000 (13:51 +0000)] 
Add an "#if 0" that can be changed to "1" to cause all %p output to render
as 0, thus making comparisons of .treetrace and .wheretrace output easier.

FossilOrigin-Name: 65e2704c0bc329f3dd248548a2d4edb7d3ace8ceaf0b82b8618b9b1b764884cd

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

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