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

6138 Commits

Author SHA1 Message Date
dan
cb1bf41aaa Restore 3.53.0 handling of codepoints u+fffe and u+ffff (they are separator characters) in fts3 and fts5. See forum post [forum:/info/9c6ec90d24 | 2026-10-13T08:37:16Z].
FossilOrigin-Name: f5ed4850175263ef66fade0d54193dfa96935ae63e2516922b7aae816924726a
2026-10-13 15:51:29 +00:00
dan
c8922e6f6b Merge fixes to vec1 made on trunk into this branch.
FossilOrigin-Name: 2ca1a93f01b777276494cf2bd6f7aaa86deeb2d8a43dbcd5dccc3a31318482a3
2026-10-13 14:59:41 +00:00
stephan
5ba0b0a4e0 Merge wasm-post-3.54 into branch-3.54: wasm build updates for emcc changes and an OPFS fix for an as-yet-hypothetical failure case.
FossilOrigin-Name: c32cf3e355c4656a4415c7f3cf4de4701f9da6aa5f928487e257293b6e78b274
2026-10-13 06:45:28 +00:00
dan
ab1268f758 Fix test script errors causing problems on windows.
FossilOrigin-Name: 379c017e8f999c35e3b3de64fcc3923e45570ba20bee50a3dd00f6996990a033
2026-10-08 16:17:45 +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
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
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
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
drh
e8cbe2c96a In QRF, add the zero-pad flag to the default floating-point format in
output modes that render JSON or INSERT, so that infinities are shown
as 9e999 or similar instead of as "Inf".
[bugs:/info/2026-10-04T05:35:43Z|Bug 2026-10-04T05:35:43Z]

FossilOrigin-Name: f63139ba68bc7df770bbd3c26bcd760c479889fb45fa921e9e225e38c9e2044c
2026-10-04 16:23:01 +00:00
drh
cb0a13c7d1 Avoid truncation of a 64-bit value into 32-bits when it is the N
parameter to the geopoly_regular() function.

FossilOrigin-Name: 13d8921bcabc4a5a5295652d29982ae18cf0190299ee9e655c7e0f2b4d658de9
2026-10-04 15:41:24 +00:00
drh
47a64b8639 In the geopoly extension, any polygon with 16,777,216 or more vertexes is
considered malformed.  So the number of edges must be between 4 and and
16,777,215.
[bugs:/info/2026-10-04T04:58:23Z|Bug 2026-10-04T04:58:23Z].

FossilOrigin-Name: e8b7f75e65eff3616d3f15da758d71ac554534694ef8d86642615898907c5a79
2026-10-04 15:23:09 +00:00
stephan
5be47b15c4 Adapt wasm build for emcc's deprecation of-sMEMORY64=1 and -sWASM_BIGINT=1. Enable emcc -sASSERTIONS for fiddle at the suggestion of an emcc OOM error, as that flag makes such errors more informative.
FossilOrigin-Name: 5ca28b4ba3410d69021d4470aeb01f454b4b85e1ed6aa54a1480c53275b868e4
2026-10-04 12:10:08 +00:00
dan
ccbdec8444 Fix some formatting issues in test program vec1bench.tcl.
FossilOrigin-Name: da8069b877ab9fa545b686050c3563cc1b04f0de0c0da0de910db42c36ed2f38
2026-10-03 15:54:28 +00:00
dan
11e6caf066 Fix a test case in rbuvacuum.test that was assuming SQLite ignored trailing SQL stored in a db schema. As of [e21c5bc59a] this is not true.
FossilOrigin-Name: d47bc6e0d2fc0444612e8e43265e2a9083f1fcbc4489cabbf25e43538431fc42
2026-10-03 15:29:06 +00:00
dan
cb5651e46d Fix integrity-check fails that would occur if the database contained a contentless fts4 table. Report [bugs:/info/2026-10-02T12:22:03Z | 2026-10-02T12:22:03Z].
FossilOrigin-Name: ca8de9a30484d26739a09c972c525a1ae6edcce41b0f3c612805836b894c7a26
2026-10-02 14:33:50 +00:00
dan
9696acb0c7 Change the way the session module applies changesets containing two or more UPDATE changes that form a dependency loop in order to avoid triggering ON DELETE CASCADE actions.
FossilOrigin-Name: 99aab2c99220a3814124a57653e6627aa91c24459bf4eb87e69c9ed0b3378a0c
2026-10-01 16:48:03 +00:00
dan
277113a474 Import code for vec1 into ext/vec1/.
FossilOrigin-Name: 92709f54d4c58cf174f305b58971a01878af313157a11549b588a25216701f5c
2026-10-01 11:21:02 +00:00
stephan
0caf6b532d SAHPool VFS tweaks contributed off-list by Jure Rotar: hardening against malicious inputs and I/O errors. Truncate to the shorter length when overwriting a db file with a shorter one via importDb(). Correct xOpen() to honor the combination of CREATE/EXCLUSIVE flags.
FossilOrigin-Name: 7af745868b873daacdbb57621201887f80782cef4e10ef24243a15ae88897f0d
2026-10-01 08:13:58 +00:00
stephan
58fddadb23 Remove an extraneous nearly-full-file level of indentation in ext/wasm/tester1.c-pp.js.
FossilOrigin-Name: b838769b4b115518feba1ea1f6a39f49427870cae824ec7225627565ab91de3e
2026-09-30 20:59:50 +00:00
stephan
ca9a8adfa4 Add tests demonstrating kvvfs locking errors across multiple connections to the same storage. Add sqlite3.oo1.Stmt.resetNoThrow() for reasons described in its API docs.
FossilOrigin-Name: 0fed9bcbe2c33d8db5b3500b506bcdfa6a2c718a65bfef4f1d2d21951f6341a8
2026-09-30 19:26:14 +00:00
stephan
c15f5adadb Rework the JS kvvfs xLock(), xUnlock(), xCheckReserved(), and xSleep() analog to the recent opfs-sahpool changes to make it more robust when a given kvvfs store is accessed via multiple handles (all necessarily from the same thread). This does not break anything but also does not prove anything - tests are pending.
FossilOrigin-Name: d0e27fa55b05832dc2ad52d5bdb56e74dae2d95984e0f8f8d1831015c5fcd781
2026-09-30 18:40:09 +00:00
dan
066a18e5c8 Fix a typo in the VERTICAL_SUM_GENERIC() macro in vec1.c.
FossilOrigin-Name: b55faf3253cd5d2fc69b4e025f4707bda3600c553f85aff152cfd4e71e54c81e
2026-09-30 17:50:20 +00:00
dan
9559d8940c For msvc, __AVX2__ implies __FMA__.
FossilOrigin-Name: 2196a779fbf1a3f174a24d29e14823f09de6b743f321ccc845e8782c7987edad
2026-09-30 17:38:45 +00:00
dan
23a0706663 Fix problems in vec1rollback.test preventing it from running on windows.
FossilOrigin-Name: d15cf3890230d5a870e50448c69d640fedcbd15f32788b808cb1f212399e2796
2026-09-30 16:41:58 +00:00
dan
806fd19e32 Fix definition of VEC1_META_4BYTEMIN so that it works with msvc.
FossilOrigin-Name: c9b4c9c0aaf0c314312381558ed9cf60aac800dfb4f5701d4d2e1f5268b7f081
2026-09-30 16:38:56 +00:00
stephan
519e4c23a5 [fa44643f65d6] inadvertently removed its circular-cleanup protection by fixing the finalizer ordering. This check-in fixes that. Spotted in [forum:ba4cb328a7|forum post 2026-09-30T14:59:13Z].
FossilOrigin-Name: 771faec269d786f01fc8d9155fd546d09ea6ca2eba0f0c97e34e795f64719454
2026-09-30 15:46:02 +00:00
dan
e32fbe0c23 Import vec1 sources into directory ext/vec1/ of this project.
FossilOrigin-Name: 3a0876d973868be7b6f4156a434cd09098c7ab1abdc7f0ef4f3d12a03de68b24
2026-09-30 14:49:16 +00:00
stephan
cdbfe6a938 Do not inherit the OPFS SAHPool's xSleep method from the default VFS, as doing so can cause the thread to freeze. This VFS only deals with contention originating in the same thread, so xSleep() needs to be a no-op. Addresses [forum:3f0794c5d8|bug report 2026-09-30T12:52:54Z].
FossilOrigin-Name: c9dd4d88e44a9eae4ea11d0ce5491c7ac2ac2d60a3bc83ed485812234be374da
2026-09-30 13:23:56 +00:00
stephan
f4786666d9 JS: when disposing of a C struct instance, do not unmap the 'pointer' property interceptor until after all client-added finalizers have been called.
FossilOrigin-Name: fa44643f65d6815c8c21ec25e7aa6e39a00fdc818d1d058e03123042e45884e1
2026-09-30 13:18:14 +00:00
stephan
3b28aa1ce7 Fix the OPFS SAHPool VFS's xLock/xUnlock to properly deal with multiple handles to the same underlying file within the same JS thread. Addresses [forum:5e66a600ba6e57de|bug report 2026-09-30T10:49:15Z]. Also (unrelated but code-adjacent) make sure that the VFS releases all of its internal mappings when it's paused.
FossilOrigin-Name: 9e2caaa382cee5d5df26ad3af7d727ab3f68a912e39655ffcc52f592d5a08a8d
2026-09-30 11:48:29 +00:00
stephan
737c12a04c Minor JS doc correction.
FossilOrigin-Name: 6b470917b2c9ab25d1e7fed56f19f37b5c2fc3f2a3d504a752a7bb2db14a3ee6
2026-09-30 10:36:27 +00:00
stephan
9fd5a0bc55 Correct the xCheckReserveLock() impl of the OPFS SAHPool VFS to fix a corruption case involving multiple handles in the same JS thread to the same filename when one leaves a journal behind. Addresses [forum:b2fbb61642|bug report 2026-09-29T18:25:28Z].
FossilOrigin-Name: 9168a6f1bedba87117169d096f9a6fcadaac65249d707193e4bcbc25e59ccb54
2026-09-30 09:53:09 +00:00
stephan
226a2c0d6a Generic internal JS cleanups. No functional changes. Update the preprocessor for the ability to use C-style comments in directive arguments.
FossilOrigin-Name: b2699eb9676e6f5459b8279661c264ba2c803ae133f85c703984deb7afa4fe60
2026-09-30 09:17:12 +00:00
dan
3a11beb10e Change the way the session module applies changesets containing two or more UPDATE changes that form a dependency loop in order to avoid triggering ON DELETE CASCADE actions.
FossilOrigin-Name: 05acfd4dc9a31b9437b44cd8ca13df9f0c54d53af05d601bde537303dff92435
2026-09-29 19:42:37 +00:00
stephan
1f7010d4ec Add the preserveOnInitFailure option to the opfs-sahpool VFS.
FossilOrigin-Name: f2d34323203372a0bb58f94a7b2a43334bebf307ecc37443dcd6018a465f2118
2026-09-29 14:25:31 +00:00
drh
a7d4cd04b5 Fix a harmless compiler warning in fts3ChecksumIndex().
FossilOrigin-Name: 44e0d3e2ad294afbcefdfac0e9a28a8bd432b14ba68b13b50fb0663e376f165a
2026-09-29 12:02:34 +00:00
stephan
ad1bbfc2bd OPFS SAHPool: more cleanly handle an init failure. Add an init option which tells it not to wipe the storage if initialization fails. Based on the discussion and patch in [forum:5664cd4baee50236|forum post 5664cd4b]. Minor doc updates in unrelated code.
FossilOrigin-Name: 0560c3cc20f60caee42492e4d2063aed8d8d44b0a544a8c3aae56ee67da2e4a7
2026-09-29 08:31:55 +00:00
stephan
998173efcd Update some long-dormant JS test code for refactoring-/renaming breakage induced since it was last used. Remove a separate long-dormant JS demo which cannot work with the current code.
FossilOrigin-Name: fc4e246dc26f3e3872dde42ceefcea70ba4158a92ba94361656b2ca0f4e3ef92
2026-09-26 06:23:08 +00:00
dan
7a5d84c684 Avoid dropping an error code in fts5 contentless-delete mode after parsing an %_docize record. Report [bugs:/info/2026-09-25T15:52:10Z | 2026-09-25T15:52:10Z].
FossilOrigin-Name: 52f84cfcdb4ac2d959a2f7ee4bc832e7f49204c86e8762042c99e19488d34f5b
2026-09-25 17:42:10 +00:00
dan
2c723787f9 Have RBU refuse to update any table with GENERATED columns. Bug report [bugs:/info/2026-09-25T10:43:02Z | 2026-09-25T10:43:02Z].
FossilOrigin-Name: 2cde8fd0a272170464912c62d42d9ca754a166fb0bba0ea57ea7a0c1a28fe6d4
2026-09-25 16:35:54 +00:00
dan
078d71402f Fix 8 byte buffer overwrite that could occur when applying RBU updates to databases containing indexes with more than 16 columns. Report [bugs:/info/2026-09-25T11:18:49Z | 2026-09-25T11:18:49Z].
FossilOrigin-Name: 7b4fa1d8cd8e43d858ed80549d653f412345468ac699c699a44e78435f59e8c3
2026-09-25 15:12:14 +00:00
dan
00830b2819 Fix some cases where fts3 integrity-check was not detecting corrupt databases. Report [bugs:/info/2026-09-25T11:18:11Z | 2026-09-25T11:18:11Z].
FossilOrigin-Name: 9b23f99212f49587c5f0b025e90fdd2e844437fbb76fc11c26062df7bcff765c
2026-09-25 14:55:16 +00:00
dan
d21bd37c7c Avoid a use-after-free problem in rtree triggered by an attacker manipulating the shadow table schema to ensure sqlite3_last_insert_rowid() returns 0 after certain INSERTs. Problem reported by Claude and Ada Logics.
FossilOrigin-Name: 6a9e1415659f9e75940b3c3a6f6e123f61c5e9e2a7a612693ee395d7b7567bef
2026-09-24 20:14:31 +00:00
dan
2503dc6182 Avoid marking little-known extension function next_char() as SQLITE_INNOCUOUS by default.
FossilOrigin-Name: 481a1df638aeef163022523f8de590c265f64d078eb070cf262995e8ecb0f690
2026-09-24 17:09:56 +00:00
dan
f544d3599a Avoid leaving an fts3 porter tokenizer cursor in an inconsistent state following an OOM error. At the moment, this does not cause problems because fts3 always frees a tokenizer cursor following an OOM. But it might if some other code used the porter tokenizer implementation.
FossilOrigin-Name: 75c1ee9de670c6366200df65b3a2c7c8888f709e985b5eaf81d57e562ab65b93
2026-09-24 15:53:23 +00:00
drh
c62a4430f9 Work around quirks in MSVC associated with [d046d5f4c6855].
FossilOrigin-Name: 18b6a43eb8c242e923a852c046a48fe8430d1596c286e114eb1383d6de9adafa
2026-09-24 10:55:16 +00:00
drh
9da2d2374a The --escape mode for CSV should default to "off".
[bugs:/info/2026-09-23T16:25:07Z|Bug 2026-09-23T16:25:07Z]

FossilOrigin-Name: c356641fadf591bcf312ae9657ddc84e483a06aa068eb2d3021467435cbad0c1
2026-09-23 21:04:57 +00:00
stephan
a8d1f1ff12 Fix a small potential buffer overwrite in the JS impl of kvvfs to resolve [bugs:8d4fe4cc4c|bug report 2026-09-23T10:50:46Z]. Remove some adjacent dead code.
FossilOrigin-Name: c43287d8855b3f9a4621545793ecb2a89ef456d563d8377f2b243812e6acb2b3
2026-09-23 14:00:07 +00:00