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

6163 Commits

Author SHA1 Message Date
drh
b66207d732 Fix a one-byte buffer overread in FTS5 associated with LIKE processing.
[bugs:/info/2026-10-23T12:49:10Z|Bug 2026-10-23T12:49:10Z].

FossilOrigin-Name: 60222d023e889eb8c67c0a654637c3f3da741b37143f1b3351a7ac4ef09befc6
2026-10-23 13:22:05 +00:00
drh
881f4fd025 Fix a UAF in FTS5 on a query that uses a prefix query and a ordinary term
inside of a transaction.
[bugs:/info/2026-10-23T03:10:17Z|Bug 2026-10-23T03:10:17Z].

FossilOrigin-Name: 599f3345b99b79e11a71bd0087555d0980f2af5cffb6b78683a5027e78f67831
2026-10-23 12:23:36 +00:00
drh
878113ff3b In FTS5, fix a potential read past the string terminator while parsing
a malformed RANK input.  Private email from Mirchev.

FossilOrigin-Name: d7e1c85c176083d78b60b3098a863754160edada5b0cb924b3468650713c1075
2026-10-23 09:48:13 +00:00
drh
a0599e8b60 Fix a heap-buffer overread in FTS5 due to a corrupt inverted index holding
an empty doclist.  Private email from Mirchev.

FossilOrigin-Name: d0716cc48bd182436ae017ffc25b8889854cb82f8209b82f8d0af6cda6dedd56
2026-10-23 09:38:43 +00:00
drh
03c3a3edd2 Make the session rebaser more robust the face of column count mismatches.
FossilOrigin-Name: 12285a3f4efdf41210fa3020127670b0d1fd8d740a5ac43db0c6641fec3e5142
2026-10-22 11:35:33 +00:00
drh
007df2b477 Add a rootpage number lower bounds check in the "recover" extension.
Test case in TH3.

FossilOrigin-Name: 4a1fd244b5ca93c6cfe1e0f8e1d087d5b99482081e4b760d09909959c258e506
2026-10-22 11:19:52 +00:00
dan
0269dadc3d Avoid returning extra rows when the RHS of a "rowid = " constraint on an fts5 table is not an integer value. Report [bugs:/info/2026-10-20T20:31:49Z | 2026-10-20T20:31:49Z].
FossilOrigin-Name: 5a09fc807377b4cfa37b06d69101530611df143bd64f3384db480797d8795fea
2026-10-21 15:25:33 +00:00
drh
e3a9db8c15 Raise an error if a REGEXP pattern ends with "\\".
[bugs:/info/2026-10-20T13:44:52Z|Bug 2026-10-20T13:44:52Z]

FossilOrigin-Name: 480d6e1a39a2057685260cf8386a3dbef4f391c6d1766a6cded5f8cc4d1a0ec4
2026-10-20 15:42:45 +00:00
drh
7697c7d2b9 Fix QRF so that it correctly handles zero-length output appended to
the sqlite3_qrf_spec.pzOutput result.
[bugs:/info/2026-10-20T13:22:11Z|/info/2026-10-20T13:22:11Z]

FossilOrigin-Name: ee344fc063ec0de8f1cd4c61c88eca33c2587c52d868202db3c514f0bc2fae52
2026-10-20 14:36:09 +00:00
dan
d89373dc10 Fix a problem causing queries on secure-delete fts5 databases to occasionally return extra, non-matching, rows. Report [bugs:/info/2026-10-18T20:40:47Z | 2026-10-18T20:40:47Z].
FossilOrigin-Name: 10b8f4166da26908aef9182824b0c967af7d861ff6c83daed7cd50321ee563b3
2026-10-20 11:13:15 +00:00
stephan
f6ba5a5abf Correct two bugs, dating back to [96ba44946b|2022-12-23], which caused the JS wrappers of sqlite3_bind_text/blob() to severely misbehave. Add missing tests. [bugs:bbb715c3f2a0e989|Bug report 2026-10-19T19:03:55Z].
FossilOrigin-Name: d45943cbaf35f21f72b78aafa88f72830343bfeb3a0198a3af0da063dcf6a707
2026-10-19 21:07:18 +00:00
dan
6410c0e4a9 Avoid dropping error codes from the streaming input callback in sqlite3rebaser_rebase_strm(). Report [bugs:/info/2026-10-18T05:31:08Z | 2026-10-18T05:31:08Z].
FossilOrigin-Name: 90f953b42a7c9c4939b215fa9e1fe11cf381978d3ee7737d390ae14611cccbcf
2026-10-19 20:21:23 +00:00
drh
154360f1cd Fix a regression in the CLI's handling of control characters in CSV output,
caused by [d0fe92e0ce8662b9].
[bugs:/info/2026-10-18T20:38:57Z|Bug 2026-10-18T20:38:57Z].

FossilOrigin-Name: 2146eab561d153b70eb41c54bb122ea8d2dc0ad983f00639aa2f65fd3a64e603
2026-10-19 19:15:13 +00:00
dan
6a63c4070b Fix a problem in the sessions rebaser occuring when a DELETE/REPLACE rebase record is followed by another rebase record on the same row. Report [bugs:/info/2026-10-18T05:00:41Z | 2026-10-18T05:00:41Z].
FossilOrigin-Name: c2d299124211d8780bc0beab8217fc53da8aadca0c3abce0fedbe84506ef412a
2026-10-19 18:57:35 +00:00
stephan
c01201027e Wasm build: move wasm-strip to after wasm-opt, at recommendation from an Emscripten ticket. Remove several more uses of -sWASM_BIGINT=1, as described for [cc9457981e2a].
FossilOrigin-Name: c2fc091401aa8c75db5f0c98486d9ee1e54fb6c96ec2dc04eecca41aa26990a1
2026-10-19 18:33:02 +00:00
stephan
16327cc106 JS: resolve a [https://github.com/emscripten-core/emscripten/issues/28016|build regression] triggered by Emscripten 6.0.5+. Remove the -sWASM_BIGINT flag from the build because (A) it's been Emscripten's default for a long time and (B) Emscripten now warns loudly if it's used. Remove a stray build flag from fiddle, inadvertently introduced in [c32cf3e355], which caused it to build in 64-bit mode.
FossilOrigin-Name: cc9457981e2a63d271525b1d891a63dd28b1c2da04777228e27132d7cc743cfa
2026-10-19 18:05:25 +00:00
dan
18a23191bf Avoid crashing if an RBU vacuum is attempted with a VFS that does not support RBU. Report [bugs:/info/2026-10-19T12:21:34Z | 2026-10-19T12:21:34Z].
FossilOrigin-Name: 5024b528dcf419393086d89eff50aa1b52116bb05b6e07849555f76891bc68a0
2026-10-19 17:44:46 +00:00
stephan
55b6ae8606 Apply [5080eb6d7a7a] to a similar case in the JS test suite.
FossilOrigin-Name: 336154a23a2a98df12a2a5e6ef51221acccef4063936cbb48cbb77a24cf1bd26
2026-10-19 15:06:38 +00:00
stephan
d37e0daad3 JS: reject URL arguments which may influence the load path for sqlite3.js and sqlite3.wasm if those values look like they might be remote URLs. sqlite3.mjs (ESM) is unaffected by this. This addresses [bugs:74f052d3d2|bug report 2026-10-19T12:25:33Z] but is a preliminary measure, with follow-ups expected.
FossilOrigin-Name: 5080eb6d7a7a7a5c2cdfd08a766f0e096d0d5536488fcf0b325e7b06a6bdd092
2026-10-19 14:50:22 +00:00
drh
853288469d The default floating point format for JSON and INSERT output modes
should be "%!0.17" to preserve full binary→text→binary round-trips
with no loss of precision.
[bugs:/info/2026-10-18T20:37:23Z|Bug 2026-10-18T20:37:23Z].

FossilOrigin-Name: c31221e954bcca2e6505338446635d0efb809f453008c4927441ebd6f0e1b873
2026-10-19 14:34:34 +00:00
stephan
352e01f2fc Correct a var name typo in the session extension. [forum:527f85c78d|Bug report 2026-10-18T10:40:12Z].
FossilOrigin-Name: 9826ef1c52fcae73dd0550982e9eda27a4ca43460ded890f9873c61d5d8020d3
2026-10-18 10:43:06 +00:00
stephan
c8e019ec97 Minor doc-only updates to ext/wasm/README.md and GNUmakefile.
FossilOrigin-Name: 7f6793fe94636e83b851919878d52201002dd9d28ac33f9e9c90d4f7cb1feacf
2026-10-18 10:39:36 +00:00
drh
ea9d6e8419 Fix an incorrect assert() in generate_series(). No impact on non-debug
builds.
[bugs:/info/2026-10-17T09:24:09Z|Bug 2026-10-17T09:24:09Z]

FossilOrigin-Name: c5d67762df0507fe58e035b572623f36efb394d08d322bbdb313a2f0da49c734
2026-10-17 12:03:36 +00:00
drh
06a948cadd Enhance ".expert" in the CLI so that when it is generating unique index
names, the probability of being unable to create a unique names becomes
vanishingly small, essentially zero.  And even if that does happen,
be sure to free the last candidate name before returning an error.
[bugs:/info/2026-10-17T09:25:38Z|Bug 2026-10-17T09:25:38Z]

FossilOrigin-Name: d43611f653bad426df8dc4ac12d0fff1662245b0715f7e66a023bd1dd129faea
2026-10-17 11:34:38 +00:00
drh
8e1b59b6dc Enhance QRF to deal with zero-length column names.
Also make use of the new sqlite3_str_free() interface.
[bugs:/info/2026-10-17T09:26:21Z|Bug 2026-10-17T09:26:21Z]

FossilOrigin-Name: d3e004fe3daeb01085e969890beb56fe71839bcad0e7a19e1690a1b2d14b2775
2026-10-17 11:13:08 +00:00
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