1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-23 21:49:02 +03:00
Commit Graph

32669 Commits

Author SHA1 Message Date
dan
a27bcfe21c Fix a vec1 problem where rounding errors when assigning vectors to centroids could cause delete operations to fail.
FossilOrigin-Name: aab150f4b39aa8dfa0df9161368b5f3b50859b2657be1bf55d06b67a03005c6b
2026-10-10 18:06:06 +00:00
drh
4c7729af99 New extension ext/misc/optname.c provides the canonical mapping between
optimization bitmaps and optimization names.  This gives a single point
of edit when there are changes.  Used by the CLI, by testfixture, and by
TH3.

FossilOrigin-Name: 135ed9e2cc9bd37c3e158a488e37f4ce14ffeca44ff12e31f25a6686a2622ca1
2026-10-10 17:40:46 +00:00
dan
31e3b6ff45 Update vec1 integrity-check method to tolerate small rounding errors when checking that a vector has been assigned to the correct centroid.
FossilOrigin-Name: 54e6ae3ae6ac533277def3105162d4578ab4499aec6fbca65000289fbdb9df78
2026-10-10 16:05:09 +00:00
drh
a32ed5cef2 Minor refinements to the TreeTracker (aka "JoinMiss") optimization.
FossilOrigin-Name: c1ad888eec410613fd5d8ce7e9192bafe4073ad56e87d0232b320b53d5e07120
2026-10-10 12:14:43 +00:00
drh
d76e14d85e Add comments to help remind developers to keep the table of optimization
disable bit values in sync with the CLI and with TH3.

FossilOrigin-Name: 0e707e7dba7edadda9951549ae3aa34b713a0f2210ccc486e181e833c74e2fa6
2026-10-10 00:11:38 +00:00
drh
265bd6339f The code for sqlite3_analyzer is still in the tree, and you can still build
it using "make sqlite3_analyzer" but it does not get built as part of
"make tool-zip" and there is no mention of it in the README files and
similar.

FossilOrigin-Name: 77278079d9dddaff30a1862bf412329e91242a41be7eafc19d3fac8d872adeff
2026-10-09 23:18:07 +00:00
drh
fc96a3c453 Add the tree-tracker optimization.
FossilOrigin-Name: e24a8fe9867370bf9766638ff2337ec7a448d5c8995ca6ceed9024e43ccb957d
2026-10-09 21:05:47 +00:00
dan
6e55a61a68 Fix some problems with handling corrupt meta-value arrays in vec1.
FossilOrigin-Name: fa41e6201609f40ce9d6ec28693e4cd143363a78f072476586f6de7fd90aed66
2026-10-09 19:12:32 +00:00
drh
012589ecab Bring the tree-tracker branch up-to-date with trunk.
FossilOrigin-Name: e5d0f760591ee7ed6535b3d2e630274e2a1a02fce5a1e3dc9a9bae41fa4d20be
2026-10-09 18:44:58 +00:00
drh
0a8c82266c Improved error handling in the ".import" command of the CLI.
[forum:/info/2026-10-09T17:57:07Z|Forum post 2026-10-09T17:57:07Z].

FossilOrigin-Name: 48fedacea79a9cd0a93d88dc38588ae0f1a011ed908b41ba4f2e2ee1160ffa44
2026-10-09 18:34:26 +00:00
drh
95a64c6528 Bump the version number to 3.55 to begin the next development cycle.
FossilOrigin-Name: 0dc7d0aaf5bacf17095a0ae7d4739458eb2c9cbaf049294589449b8787e6c48c
2026-10-09 18:11:52 +00:00
drh
581f55819c Start a new branch to receive patches for the 3.54 release. Put all bug
fixes that will go into a patch release on this branch.  The plan it to
periodically merge the branch into trunk, rather than cherrypicking from
trunk to branch as has been done before.

FossilOrigin-Name: 6b286a1bb034fc7f855e023aa0dab920366d949dd5fefcf2652039d5c6dc96ed
2026-10-09 18:11:04 +00:00
drh
6932c59ee5 Version 3.54.0
FossilOrigin-Name: be8d059e9a49089ab2dce5ed26dd87aaf598fdc5fbe0b107c0dd758464bcd5e3
major-release version-3.54.0
2026-10-09 15:46:58 +00:00
drh
039ef9acc9 Fix a typo in a comment. No changes to code.
FossilOrigin-Name: 7b468f6f1d63645c8d8132790831dac6916006f81cf97e99abec711de93feb23
2026-10-09 14:40:03 +00:00
drh
0e62f142b7 In the CLI, add comments to internal SQL functions making it clear that
those functions are subject to change and removal at any time, lest people
come to depend on them.  No changes to code.

FossilOrigin-Name: a3332bd623d997921c3186433cd1eab0c9413aa0f68d93b1731cf80128ec3a36
2026-10-09 11:47:51 +00:00
dan
fdc06f3643 Fix a build script problem causing generated file sqlite3-all.c to #include "sqlite-10.c" instead of "sqlite-A.c".
FossilOrigin-Name: 962b207123fe2bd6d72ad49fb80822b4e4290c1d77ea4ca097ea341202d4cc5f
2026-10-09 11:22:17 +00:00
drh
9cba46343e Remove the OP_IfNotOpen opcode. The OP_IfNullRow opcode is sufficient to
get the job done.  This is a follow-up to [e71b0465b9fa13db].

FossilOrigin-Name: 797081cb705c65a466379e180344d0c9d781f10415c8ed8f72edc6ea065a1a28
2026-10-08 23:59:13 +00:00
dan
bfb858c596 Ensure the join flags on the parent are set correctly when flattening UNION ALL sub-queries that include branches with RIGHT joins. Report [bugs:/info/2026-10-08T15:27:33Z | 2026-10-08T15:27:33Z].
FossilOrigin-Name: cfa69ea48a7aa379ee0c30ae81d2802da862d610f829c933e5eb358c23fc2b9d
2026-10-08 19:34:24 +00:00
drh
d0fe192fa1 Disable the "expr IN (const)" to "expr=const" optimization of "const" has
a COLLATE clause, as using the collating on "=" would give the wrong answer.
[bugs:/info/2026-10-08T12:36:41Z|Bugs 2026-10-08T12:36:41Z]

FossilOrigin-Name: 53a73aa03d05350ebee81c3d2aef85744c8ebeda72f565083dc4b472b57c5499
2026-10-08 19:06:55 +00:00
drh
f19a90c569 Improvements to the display of DDL SQL statements in the CLI and in
the sqldiff command-line tool in order to close comments and similar
in the case of a corrupt schema, and avoid possible SQL injection
attacks.  ANT-2026-9VFH4DZS.

FossilOrigin-Name: 028a92f9c353d3b400551954de2e09c1723076491f79ff767dd24b452654fda8
2026-10-08 18:34:12 +00:00
dan
28e05e55f6 Avoid clearing unrelated join related expression flags when processing window function queries. Report [bugs:/info/2026-10-08T15:38:26Z | 2026-10-08T15:38:26Z].
FossilOrigin-Name: c50d7f682cc95715e4577413196dbdb2845d7c845b0e760c7060b7cdcda87770
2026-10-08 17:57:48 +00:00
dan
ab1268f758 Fix test script errors causing problems on windows.
FossilOrigin-Name: 379c017e8f999c35e3b3de64fcc3923e45570ba20bee50a3dd00f6996990a033
2026-10-08 16:17:45 +00:00
drh
fd6452aff8 Make the sqlite3_incomplete() SQL function available in debugging builds
of the CLI, for testing.

FossilOrigin-Name: 07095b76c1f086790d35a5acd0a22b081e346bc2dca48a8fb0c0c978be2c2243
2026-10-08 13:26:45 +00:00
drh
64c2f58d73 Disable legacy "go" and "/" command terminator options in the CLI
unless compiled with -DSQLITE_SHELL_LEGACY_COMMAND_TERMINATOR.
ANT-2026-FE9980M1 and ANT-2026-G9MMWYGM.

FossilOrigin-Name: ac6ac0c22d98878cdf6042b5801cf5b5dc98c7b48077360d24a70b876921b428
2026-10-08 12:09:35 +00:00
drh
82fda1d99a Sanitize "*/" in tables names of the output of the .diskused command
in the CLI, and in sqlite3_analyzer, so that it doesn't prematurely
close the comment. ANT-2026-XQM1QD48

FossilOrigin-Name: bcde8f991a86aed6280c1b6164bc14cc1aff1a966a694a5fb32341ffa0202960
2026-10-08 10:55:33 +00:00
drh
97048e902c Update check-in [e71b0465b9fa13db] so that it does not try to to generate
an OP_NullRow opcode for cursors of an IN operator that do not actually
exist.

FossilOrigin-Name: ea315175a8076f22f85a57a01c5b490630ab20d5ed80144118ced61c8c24886d
2026-10-08 09:57:08 +00:00
drh
74675a9e87 Assign the correct encoding to the BLOB values read from an overflow page.
[bugs:/info/2026-10-07T15:44:40Z|Bug 2026-10-07T15:44:40Z]

FossilOrigin-Name: a8895cb047a3aeed35642111fa79bde9db962a5d7bc3f0cc472b4dbe510cb3f9
2026-10-08 03:28:50 +00:00
drh
644fa62518 Fix processing of LEFT JOIN when the right operand is controlled by an IN
loop.  [bugs:/info/2026-10-07T23:22:09Z|Bug 2026-10-07T23:22:09Z].

FossilOrigin-Name: e71b0465b9fa13db3922e767c1d8979d221516475670dcd3fa4df1fab30176c6
2026-10-08 02:55:50 +00:00
drh
b0db2db988 Improved escaping of filenames with unusual characters sent over the SSH
link by the sqlite3_rsync utility program.  ANT-2026-31X9HVRR.

FossilOrigin-Name: eaec2f7f3744d4cdf0cdafce22e1909208f93734bf55263a042938919bd81310
2026-10-07 23:07:55 +00:00
dan
aa49b4609a Mark vec1 training function vec1_train() as SQLITE_DIRECTONLY, on the grounds that it sometimes prepares and executes SQL statements based on user-supplied arguments.
FossilOrigin-Name: 38c5972e914ba8c54b76f6de89501fce576c4a05a7f88f90c39b268203f54582
2026-10-07 21:12:50 +00:00
drh
1ffe6567e8 Include a work-around of the Microsoft "WorstFit" bug on Windows builds
of the sqlite3_rsync utility program.  ANT-2026-H5TXKR5J.

FossilOrigin-Name: 2662a68f0d5ce1c8ffd6e8ec3e79b27f7cb5e6142a007a6641e1ac0b5a22037a
2026-10-07 17:05:09 +00:00
stephan
5af1b822f5 Doc-only tweaks in main.mk. No build changes.
FossilOrigin-Name: 2195709cd55c74021b5c5d5f4aed09143b8dad9dde99187096137ec6a575dd31
2026-10-07 15:45:48 +00:00
stephan
7e3819f40d When calculating TCLLIBDIR from the configure script, filter out //zipfs: paths. Tcl9's (file isdir) returns true for those but they are not usable for our purposes, causing (make install DESTDIR...) to install tclsqlite3 under /zipfs. main.mk's counterpart to this piece already does that filtering by virtue of the shell's (test -d) behaving more conventionally.
FossilOrigin-Name: bb109cfa9dc02605451391c6ca4ea8cf18dd51f12e9666e3301152e89750917d
2026-10-07 12:50:08 +00:00
drh
9d50c7ebfc Fix the expansion of "TABLE.*" so that it works the same as PostgreSQL
when TABLE is the left operand of a RIGHT JOIN USING.
[bugs:/info/2026-10-07T02:56:24Z|Bug 2026-10-07T02:56:24Z]

FossilOrigin-Name: d232720b7932c1cebe4cf5b1a1e9096889e1807844351390149dfeb2ea7fc304
2026-10-07 10:41:59 +00:00
drh
caa0b5886e In the treeview display for Expr, show TK_ASTERISK nodes. Debugging
logic only - not used in production builds.

FossilOrigin-Name: 5cf4df16eb23e353834af79ba639e2e17f79d9cd11abcb325f5b7ac7f869b20d
2026-10-07 10:07:16 +00:00
drh
9f05c6e66b Fix the implementation of O_TMPFILE so that it actually works.
FossilOrigin-Name: a435d786fe0e245e352d08d2e2ddf8c1e15154809e3b471810cc327e9d90ef85
2026-10-06 18:52:47 +00:00
drh
6222fff3a9 In the CLI, further improvements to delayed temp-file deletion so that
the test/output-redirect-test.txt script works even better.

FossilOrigin-Name: adacd1423f159fa4698f7e40dd1488256a13dff0b31cc90e28c3441109596ef4
2026-10-06 14:34:02 +00:00
drh
bf45b5e6ab Fix to the time-delay temporary-file deletion logic in the CLI,
added by [4e9ee211ca661fe8] but never fully debugged.  Now working
with the test/output-redir-test.txt test script.

FossilOrigin-Name: 9dd1e3a1c739045c08db36c0d6ea921472535dfab583bf689310491e64f4fa4b
2026-10-06 11:49:24 +00:00
dan
cd47f23e37 Increase version number returned by vec1_info() to "0.8". Also fix some warnings in vec1.c.
FossilOrigin-Name: 97014dfa8283019275e97f3245111b63cf9c3e2f2e9544e8790885ed0eac3c27
2026-10-06 11:13:01 +00:00
dan
77dd26bbed Fix a case causing infinitely recursive calls to vec1.xSavepoint.
FossilOrigin-Name: a6f0843000e537a68be9e65693e8da276a4f66302a9a3c72f3a3417b6d275272
2026-10-06 10:30:12 +00:00
drh
a3426a5bcc Fix the build for SQLITE_OMIT_WSD.
FossilOrigin-Name: 4bf968095f427e87ae3afe498f74e00e9058b154e12e2d261f317640f4b49cc4
2026-10-06 09:30:23 +00:00
drh
466e0851d9 When a 3-byte cell on the leaf of an index page, which has a reported size
of 4, is moved up to an intermediate page due to a DELETE, the 4-byte
page number is added.  The cell should should become 7, not 8.  If it
becomes 8, then the fragment count on the page header goes off by one.
This is technically corrupt, but is easily fixed with VACUUM.
[bugs:/info/2026-10-05T19:18:18Z|Bug 2026-10-05T19:18:18Z].  This issue
has been in the code for at least 12.5 years.

FossilOrigin-Name: a61987887a942abc4bdd10691455211b9b93028dd8c6cd5302bbd406f6474cc7
2026-10-05 22:16:16 +00:00
stephan
40f8f74946 OPFS SAHPool VFS: fix an improbable corner case in which the VFS's in-memory state and its on-disk state could differ with regards to availability of a given SAH if a write failure happens at one very specific point during de-registration of the SAH. Addresses [bugs:432f260aa7|bug report 2026-10-05T17:51:35Z].
FossilOrigin-Name: 837fee6e45464bd3fcb5064cfdb91ec15d7cf0c010106797e28e744c3cb39bbc
2026-10-05 20:26:24 +00:00
stephan
e2851bb88e Merge trunk into branch wasm-post-3.54.
FossilOrigin-Name: de71a9187069df1e5868857fc1d8f4d504db355974b3593d45df04a6e0aaf344
2026-10-05 20:04:38 +00:00
dan
c62b4abb99 Handle temp triggers attached to databases clobbered by sqlite3_deserialize() in the same way as those attached to DETACHed databases.
FossilOrigin-Name: 84c773fcc2f785346fd12e8a17ac45f9068797d9629ddc367318994b6fed421b
2026-10-05 18:07:26 +00:00
dan
b642a1d56d Ensure that deserializing into a database expires existing prepared statements.
FossilOrigin-Name: de0361b1caa97d36ea79a5bcb032539ccfb235c03581e0e88c54c03a321d7911
2026-10-05 17:51:16 +00:00
drh
6a385f1d57 Merge the latest trunk fixes into the tree-tracker branch, especially to
seal in the cherrypick made necessary by me committing a trunk change
to this branch earlier.

FossilOrigin-Name: b06cac1d938678b873be5a9286079819a1b2f4db22a8e23a1aab8e555728d2ce
2026-10-05 17:36:51 +00:00
drh
95170adc37 Fixes to sqlite3_incomplete() so that it does not appear to presume a
trailing newline if there is none.
[forum:/info/2026-10-05T16:22:33Z|Forum 2026-10-05T16:22:33Z]

FossilOrigin-Name: adc1113cfd1d675a44a4ef34d7be3e0cf20129840e542d692fefa249780e23b8
2026-10-05 17:32:25 +00:00
drh
2b52aab1c1 Fixes to sqlite3_incomplete() so that it does not appear to presume a
trailing newline if there is none.
[forum:/info/2026-10-05T16:22:33Z|Forum 2026-10-05T16:22:33Z]

FossilOrigin-Name: bc54517c86296e42ca4ff843fcf5911eb81a0975b1d05d019b2cc39152232cf0
2026-10-05 17:27:34 +00:00
dan
8a91f5484c Do not run new virtual table tests in memdb1.test for SQLITE_OMIT_VIRTUALTABLE builds.
FossilOrigin-Name: eced240b2a991ff8255f98d189a6874dda44e3cdb1fcd07e74abddf2a9a71ea4
2026-10-05 17:25:06 +00:00