dan
4b9def1903
Fix further problems with deleting from corrupt fts5 databases in secure-delete mode.
...
FossilOrigin-Name: f8f89d2e10f06b54acf58a3b0543aef749c3d2b65670d4cc71530dea7997651e
2026-01-16 20:04:04 +00:00
dan
90942efd21
Fix an error in new test script fts5corrupt9.test.
...
FossilOrigin-Name: a5918835e172fd4eda6511d297b61368952d617eac33950b67368671e3bd40fe
2026-01-15 17:17:00 +00:00
dan
ce83fd80ad
Fix a buffer overrun that could occur when deleting rows in secure-delete mode from a strategically corrupted fts5 database.
...
FossilOrigin-Name: 1e66d6e3276cc6aab4d002a1df13b044e61f3946322bf97cac06d98dbb68e433
2026-01-15 16:09:35 +00:00
dan
01f2907d48
Fix the change on this branch so that it works with amalgamation builds.
...
FossilOrigin-Name: 7f0b9e7a8bba1b73ef16257e72a055ea84fb10eb5cf0e6431fca81b2f040c5ee
2025-12-30 11:33:30 +00:00
dan
6e92494955
Avoid signed integer overflow when an fts5 'merge' command is passed -2147483648 as a parameter.
...
FossilOrigin-Name: 4c5d18d7f5bdcf95efdf96062c7434d5d10584a1fdfd65b18d331b8aae42e26a
2025-12-30 11:19:27 +00:00
dan
b4f6c09e60
In fts5, avoid holding an open blob handle after an INSERT/UPDATE/DELETE statement, as this can interfere with sqlite3_interrupt(). Forum post [forum:/forumpost/95413eb410 | 95413eb410].
...
FossilOrigin-Name: f88e1d03573f394fc7caf60704c96152717b3fe8be4eef0caeb64737054f0fd2
2025-12-09 13:41:01 +00:00
dan
8fa43479b3
Fix a problem in the xFilter() method of the fts5_vocab virtual table causing it to omit some result rows in some cases where a virtual cursor is used more than once by SQLite.
...
FossilOrigin-Name: 6c99e81e6c49c078f1b00952774a7007c60dc1b4ba8a8fc11357efe9c9233212
2025-11-28 11:52:40 +00:00
dan
d2c7e6925c
Fix a buffer overread in fts5 that might occur while processing a corrupt db.
...
FossilOrigin-Name: 8b0cbc18be3c6f2501b102757af6be98c48044a296104cca7bce822ac2304515
2025-11-26 13:58:53 +00:00
dan
264bcad69a
Avoid integer overflows (a) when dealing with zeroblob(N) calls when 2*N is larger than 2^31, and (b) in fts5 when a corrupt record is close to 2^31 bytes in size. Both of these require special builds with SQLITE_MAX_LENGTH set to a non-default value.
...
FossilOrigin-Name: 27927519696dcb78ff72e245158ea6d33a1b2c3d4da314d4d0283c47d847c3da
2025-10-13 16:07:28 +00:00
dan
eeb2e03b7b
Back out [8bf26c956e]. It is not required following [8e7da8cf50].
...
FossilOrigin-Name: ea29180797aa4bb25180432e75a372277a6f6e2262906a9e765a3bddf8ca79d7
2025-10-10 16:04:19 +00:00
drh
80f0fcd31d
Fix harmless compiler warnings.
...
FossilOrigin-Name: 4966d7a1ce42af8b1c50fdd40e651e80d0eeb8cb62dd882950cab275f98aba88
2025-10-10 14:31:46 +00:00
dan
40d299ae32
Avoid corrupting the fts5 index if a value that was inserted via sqlite3_bind_blob() in a non-utf8 db is deleted.
...
FossilOrigin-Name: 8bf26c956e199762d55c159392c2e3813a9e12b914d3ca33000bf332cd946cb0
2025-10-09 14:50:27 +00:00
drh
5b15123fba
Strengthen the fts5_locale() function against integer overflow attacks,
...
even when SQLite is compiled with oversize values for
SQLITE_MAX_LENGTH.
FossilOrigin-Name: f0dbd9d22f558dd002e2132381de3c82d55a670399b3e527b5962b025141676a
2025-09-30 10:11:44 +00:00
drh
1ecc36a2b0
Fix a harmless compiler warning in FTS5.
...
FossilOrigin-Name: 89f8d02075a7b265b1f0226a0f878903e1dce27ff1ac2e8a2d62d450b9b4ec76
2025-09-24 19:51:07 +00:00
drh
f5dc671a57
Fix a harmless compiler warning.
...
FossilOrigin-Name: 42c225a2ed7fc95f9b01467c64ba2bf97bca216fdcd6ab1ba3fb49c068650de9
2025-09-19 01:17:44 +00:00
dan
0247e15f69
Updates to where.c to handle vtabs in joins more similarly to regular tables.
...
FossilOrigin-Name: 991383262b0d07ebc79fdb6bed448013cea3a0ac13292d5397dce012b1e6a673
2025-09-13 19:23:12 +00:00
dan
a6c95406c1
Avoid depending on HAVE_STDINT_H and SQLITE_PTRSIZE and other things in non-amalgamation builds of fts5.
...
FossilOrigin-Name: 309fdd496673bf58984fb16aef3d4cc2ad8c9f6dad7687509f4d708fed5ba41b
2025-08-14 19:36:59 +00:00
stephan
d38777134b
Move the flexarray union members from [527bbc1676a85a9] to the end of their respective objects.
...
FossilOrigin-Name: 3082e07926695863bd5ef51c3c4803fbe267dc0d9b6ac9a717c225459f8988ba
2025-07-30 21:34:47 +00:00
stephan
df23b518da
Apply alignment-related patches suggested in [forum:41cd226375cd49c6 | forum post 41cd226375].
...
FossilOrigin-Name: 527bbc1676a85a927352cd10a292afe041a72692ec0b1360e5a1ccaa19a32fcb
2025-07-30 19:48:12 +00:00
dan
81e9bbf8da
Avoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses attached to left joins from being evaluated too early. Fix for [forum:/forumpost/428ef7c468 | forum post 428ef7c468].
...
FossilOrigin-Name: 9f184f8dfa5ef6d57e10376adc30e0060ceda07d283c23dfdfe3dbdd6608f839
2025-07-15 19:00:01 +00:00
dan
192d0ff8cc
Optimize allocation of large tombstone arrays in fts5.
...
FossilOrigin-Name: 0fcc3cbdfa21adf97aed01fa76991cccf9380e2755b0182a9e2c94e3c8fb38d7
2025-07-15 14:06:15 +00:00
dan
bcfe38b96a
Avoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses attached to left joins from being evaluated too early. Possible fix for [forum:/forumpost/428ef7c468 | forum post 428ef7c468].
...
FossilOrigin-Name: 18ba07c152294a96d510a7851a0860f982ff1e0725afeebed9a343f550f6925a
2025-07-12 18:14:41 +00:00
dan
9b91aac83b
Fix a problem with the fix in [5cb8e342e1].
...
FossilOrigin-Name: 043ff54fb746c54bc6cfa6aa8c8a32c876c09d36163125916ad01024b98d447b
2025-07-08 19:02:26 +00:00
dan
acd1d93497
Fix another problem with running fts5 integrity-check in SQLITE_DEBUG builds, this one causing an assert() failure.
...
FossilOrigin-Name: 5cb8e342e1d33a0fd04fd022900eeada46a2ee23f15c6abca1b37633e77429d6
2025-07-08 18:44:56 +00:00
dan
9615cf93c8
If SQLITE_DEBUG is defined, fts5 does extra checks as part of integrity-check. Ensure that errors from these extra checks are only reported if the other, normal, tests all pass. This fixes a test case in fts5corrupt3.test that was failing if SQLITE_DEBUG was defined.
...
FossilOrigin-Name: 98a53fb276fa1fa733da2dd3255c35ce9f6af9b9feef6e76fb577b6d142167a2
2025-07-08 14:54:20 +00:00
drh
925b79039c
Fix test case results in FTS5 that were changed error message improvements
...
in [48044a6b57c0a16c] but which were omitted from that check-in.
FossilOrigin-Name: e1f8e0240b14f1338e947634e840af785e5042a09cd365975e922a13a562f4cd
2025-07-08 12:37:25 +00:00
drh
e33ea17d24
Fix harmless compiler warnings.
...
FossilOrigin-Name: 13af4acebe09b047756c22b800136cffaba532e7fcaa448a4edf4fedb94e9bbc
2025-07-04 12:25:24 +00:00
dan
526399b0fd
Avoid an assert() failure in fts5 that may occur when processing corrupt records.
...
FossilOrigin-Name: 8afd6ca85724a69970181042d6aac53742ea2b76ded5966b2541c3afe1121fb9
2025-07-01 16:21:47 +00:00
dan
fe182f74b2
Improve some of the error messages emitted by fts5 when it encounters corruption.
...
FossilOrigin-Name: 48044a6b57c0a16cb75139c103ad88ca4ab64d74f70a3dee0d8b817fbfbec3c6
2025-06-23 19:38:22 +00:00
dan
6a5e74cbf0
Fix a problem with UPDATEs on fts5 tables that contain blob values.
...
FossilOrigin-Name: badf3014bd1620fd3d4b8013f641fd820b249649fb93cc75b7b8df9dfd6f32a6
2025-06-11 15:03:53 +00:00
drh
8ae57fab64
Use a more robust backup definition for offsetof().
...
FossilOrigin-Name: 22441955e03df07903b98832a60c05c53721cd67c667f6c83d5e97fcc62735ee
2025-05-30 15:43:04 +00:00
dan
b65326f51a
Add "include <stddef.h>" to fts5 and rtree to ensure that they use the system version of the offsetof() macro when it is available, as the built-in version triggers ubsan errors with clang.
...
FossilOrigin-Name: 838deb7f3423df84061a043928ed34e1d74e2e7d57ef1a9519bb32fea82e4352
2025-05-30 11:14:11 +00:00
drh
37f22ff75e
Fix a problem in the fts5matchinfo.test file that prevented it from
...
working on Mac.
FossilOrigin-Name: 5a411c609ba0ee17b1ce5bd0b40b9ded92d76f35933f92b2e02a58a3f169c715
2025-04-22 18:45:40 +00:00
drh
8a6f89c845
Remove unnecessary "www." prefixes on domain names in URLs.
...
FossilOrigin-Name: 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6
2025-04-10 10:18:07 +00:00
drh
7b99cd6063
Prevent integer overflow when parsing NEAR queries in FTS5.
...
FossilOrigin-Name: 1a5283d7dab210badb8a33eac29f44dc8c1c210ffb5ef84f43e348170aa406a6
2025-03-17 15:13:47 +00:00
drh
bd0e3ed522
Use flexible arrays whereever appropriate in FTS5.
...
FossilOrigin-Name: 16dfc415b6e98a2acae79a24bb0afd401e60efc27cbdd1603a426fd33e17d427
2025-03-15 12:22:39 +00:00
drh
17abe9e251
Convert the Fts5Sorter.aIdx field to a flexible array.
...
FossilOrigin-Name: 28ac776a23da2753265a7fe2ee2ebb09964815fc9058e69c08275fc217842edc
2025-03-15 00:11:22 +00:00
drh
502b7a236e
Turn Fts5Colset.aiCol into a flexible array.
...
FossilOrigin-Name: 0c4d9c74741794468adc444908f6024f016738aa2852d3a646f2c28d079d9446
2025-03-14 23:57:53 +00:00
stephan
da5f813878
Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.
...
FossilOrigin-Name: f50c21484d3cac73589da0376c423de39ae8b842218105786c5aa3726e4dcaed
2025-02-27 21:17:55 +00:00
stephan
5d60f47001
Approximately 50 typo fixes, spanning the whole tree, contributed via [forum:006c8fa165083ac3|forum post 006c8fa165083ac3] and individually checked for correctness. Affects only code comments, docs, and a single line of debug output in a test app.
...
FossilOrigin-Name: af928818a030924060ee0762431dae0f16d53a62f4e1132754d052eb9c621ac2
2025-02-25 20:55:14 +00:00
dan
eb3a069fc8
Have SQLITE_FTS5_ENABLE_TEST_MI builds avoid reading the database schema from
...
within sqlite3_open().
FossilOrigin-Name: 15dc524fd4113026cc542140c39c1c8f9e052d36946f0c599f282d9ac27efdab
2025-02-18 15:11:30 +00:00
drh
7bfa4452a3
Additional changes making it easier to prove that integer overflow does not
...
occur. No problems found.
FossilOrigin-Name: e846743a875430a5c51d41f00ac9532214f97d9925e6261113b63580f92369fc
2025-02-17 18:09:24 +00:00
drh
c2b446f16a
Fix for a potential UAF in FTS5.
...
FossilOrigin-Name: e33f2fedda17b4f3678fc23c438093c256b0c125da5f1ac42ecaf3d604d54b6a
2025-02-03 18:05:54 +00:00
dan
9e639d2490
Fix a use-after-free case in fts5 provoked by fuzzdata8.db. Tcl test case pending.
...
FossilOrigin-Name: a4962df665084e423e020be9a2834b6886a8e3feb461cff5358b61398a2a20d2
2025-02-03 17:54:55 +00:00
drh
e097db7210
Make two private routines in FTS "static" so that they are not callable from
...
outside of SQLite itself.
FossilOrigin-Name: 9b11bed0448b95319206b413c35f23bb80f3f4c0a4394d40f2e64066400a01ed
2025-01-26 23:34:49 +00:00
dan
b80d01a182
Have fts5 better handle OOM errors from sqlite3_blob_close().
...
FossilOrigin-Name: f418350f3f83147bc5817a885be6e39ff9ff5722742a88d17600729c53c65010
2025-01-21 14:34:59 +00:00
dan
467e20ad1d
Fix an assert() that could fail if a virtual table called sqlite3_step() from within the xSync() method while committing a "PRAGMA defer_foreign_keys=1" transaction.
...
FossilOrigin-Name: 39bdbb3f6dd1d30d180526d35c11f789f5e9d45b99ead72fd4a3b136afab66b1
2025-01-20 18:26:58 +00:00
dan
b1cbae8bd6
When removing an fts5 in secure-delete mode, defer setting the table version to SECUREDELETE until flushing data to disk. This prevents problems that can occur if there is a rollback or statement rollback operation.
...
FossilOrigin-Name: c359e555ceafcaab2ae38074bc4f57cccdc5bc6080d17f82290c09b9e5dd80c2
2025-01-09 14:10:25 +00:00
dan
c1242d60d9
Fix another assert() failure in fts5.
...
FossilOrigin-Name: 6da37893f5b5729ea5fd632e8d98789e867488a67501d4a4dad92f8e7cb6bda0
2025-01-08 20:43:03 +00:00
dan
ad460db7eb
Fix a crash in fts5 that could occur if shadow tables are modified or removed.
...
FossilOrigin-Name: c0b691095ae72fc07530777ef6d23688fb4196ce2e0feff14fc3c597c572252d
2025-01-08 15:54:44 +00:00