drh
bd0e3ed522
Use flexible arrays whereever appropriate in FTS5.
...
FossilOrigin-Name: 16dfc415b6e98a2acae79a24bb0afd401e60efc27cbdd1603a426fd33e17d427
2025-03-15 12:22:39 +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
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
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
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
drh
4112a63b8f
Four new assert() statements to help with static analysis.
...
FossilOrigin-Name: e7f7c9d22be8a17b9a4d8f954fcdd40591ba9da5fb674f1184f960bca5f3d30b
2024-12-29 11:54:12 +00:00
dan
032bcf72fb
Fix compiler warnings caused by variable shadowing.
...
FossilOrigin-Name: 211b305791980b24c4192ffc57a0471473de3fca32bfc146c0eeacedef7a88aa
2024-11-20 20:39:18 +00:00
dan
090b8649be
Allow an fts5 table or query to be configured to collect xInstToken data for any prefix terms as part of the first parse of the main index, if any.
...
FossilOrigin-Name: 46929ae92b26f02bc70de9931b21a8a7cf9a2453d5fb07f68b712f62e28e9152
2024-11-02 19:10:50 +00:00
dan
b27a30c620
Merge latest trunk into this branch.
...
FossilOrigin-Name: 740a37c5d54b57befa86a6bb299ffa89ed4243d10db885a08ab5c63238460dad
2024-10-27 14:41:58 +00:00
dan
d2a88e961a
Rationalize code further. And add tests.
...
FossilOrigin-Name: 0ca002a4ab88f3e7ae1e6e518038157eaa20759f57888c2ed7e50cb92bd96348
2024-10-01 20:38:08 +00:00
dan
d5838eaa42
In fts5, avoid starting a new merge of level L if there exists already an ongoing merge of a level less than L.
...
FossilOrigin-Name: 350c6e75ce3c1e81458d1baa73045df489284206e8b279ab3c2f5e3d011c262a
2024-09-30 17:28:45 +00:00
dan
7d56669bc4
Rationalize some of the new code on this branch.
...
FossilOrigin-Name: 66f209ba40e7de49b304d7931ff38a4994038452aab08e9347286a234c6f7075
2024-09-28 20:45:11 +00:00
dan
2eff8f2252
Change the way tokendata indexes are collected for prefix queries.
...
FossilOrigin-Name: 204ddf4e726b695dd12ab4a945ec2461655aa0bcc38b74e970f07ed2ac43c6ff
2024-09-25 18:55:11 +00:00
dan
e25a267e81
Fix the fts5 xInstToken() API for prefix queries that do not use prefix-indexes. This is experimental.
...
FossilOrigin-Name: 97c2824f471e7e622c4a166947a6e8162cae891345101539829a6fcec83373fe
2024-09-14 20:30:14 +00:00
dan
70989b6f59
Fix a technically undefined signed integer overflow in fts5.
...
FossilOrigin-Name: e6bec37ea1ca51e1d048941ce4c5211d8fc5c5e3556a1441f9c79b036843f9e3
2024-09-02 18:41:59 +00:00
dan
a592883d87
Add extra assert() statements to the fixes on this branch.
...
FossilOrigin-Name: 81b6360050eea95e4367de1b41b5864a640b4d1c5c8fc3bea3b96ed770cb0325
2024-07-17 16:27:36 +00:00
dan
7acf972c59
Fixes for platforms with 32-bit pointers that require 64-bit values to be aligned.
...
FossilOrigin-Name: 2212d7488ed4ec2839ffa45cb9567056b36519434834634e4ecc441c330694d7
2024-07-13 16:53:56 +00:00
dan
5e5831a760
Handle an OOM case in fts5 code to query tokendata=1 tables.
...
FossilOrigin-Name: 01222d96b9ab24c7013a2587544304ba32c1f039b08c06a04d8d58ec9c790db0
2024-02-16 11:41:47 +00:00
drh
c1805ab222
Avoid signed integer overflow during integrity_check of FTS5.
...
FossilOrigin-Name: 5937df3b25799eceaadfb04d7226c9995d44c8d8edb5ac3ad02af9d7e3570726
2023-12-24 11:31:20 +00:00
dan
0810150532
Fix a usan complaint about signed integer overflow.
...
FossilOrigin-Name: e65907e0279f4814ec957f0790777d8b94a86926cd27c52442b311b27efc0185
2023-12-22 14:47:30 +00:00
dan
05980f5931
Avoid dropping an error code in new fts5 tokendata=1 code.
...
FossilOrigin-Name: a66596e33dc9aa4bab2ec3ff45546e1321d0a11bdc764f8381b315292ca92423
2023-12-08 12:04:32 +00:00
dan
7c12666fe9
Avoid an assert() failure when querying an fts5vocab table that accesses a tokendata=1 fts5 table with corrupt %_data records.
...
FossilOrigin-Name: 386ba9e20423fb2f623d6adc9d3c310fb1b135f54a1dad15ef3b593d97886926
2023-12-07 20:46:40 +00:00
dan
1ddcf7dd95
Fix a null-pointer dereference in fts5 tokendata=1 code.
...
FossilOrigin-Name: d69fa8f0504887f968d9a190ecb889ddb40bb1b56d0d4479f9819c106aec719b
2023-12-07 19:08:25 +00:00
dan
5f2f8d0028
Fix a problem with handling OOM and other errors in fts5 when querying tokendata=1 tables.
...
FossilOrigin-Name: bc911ab5953532956510c199be72b1d3c556f2d0ddbd7fc0ae6f5f917b337b48
2023-12-07 18:41:49 +00:00
dan
2f3ccb8886
Different fix for the fts5 COMMIT-following-OOM problem first fixed by [fba3129d]. This one does not cause problems if an fts5 table is renamed and then dropped within the same transaction.
...
FossilOrigin-Name: d8c6b246944934a7a6e027b3f5b986fd64a19dd5c5c5175f4ea8586da59a6764
2023-12-07 14:41:58 +00:00
dan
00f3ac5544
Fix compiler warning about shadowed variable in fts5_index.c.
...
FossilOrigin-Name: ee70e4c1c9c41617850228e48d8df44f105cf2fbbe789340ceca6f27ad6ce5eb
2023-12-06 18:34:59 +00:00
dan
fb923fc4cc
Further tests for the new code on this branch.
...
FossilOrigin-Name: 59d008b6c23ab900377bc696ee19381feb7614bac80546eae361e401c3620c4e
2023-12-05 18:36:23 +00:00
dan
910c77b049
Fix memory leak in new code on this branch.
...
FossilOrigin-Name: ebc160b9a05568df66f86e30804399ee29d34b44a60c57e062f98cb92826353f
2023-12-04 17:58:56 +00:00
dan
9d373ca1c5
Fix bug in xInstToken() causing the wrong token to be returned.
...
FossilOrigin-Name: da78d07e77cbc783fbc725758911c230fd6a1c1885d9576125de955dcc2bd37f
2023-12-04 17:05:37 +00:00
dan
c22d2b7b7f
Fix various compiler warnings and other problems with the new code on this branch.
...
FossilOrigin-Name: 3a623cfa173b4035c759cb84985d11d8727053beb383648503987d6ab15c0ef0
2023-12-02 20:35:04 +00:00
dan
94c521295a
When tokendata=1 queries require multiple segment-cursors, allow those cursors to share a single array of in-memory tombstone pages.
...
FossilOrigin-Name: e0175d07e4094db5ea4b0378a5ff480dafb6ba9da86a113fa767c4c89c3c866f
2023-12-02 18:14:07 +00:00
dan
c44041e03b
Ensure that tokendata=1 queries avoid loading large doclists for queries like "common AND uncommon", just as tokendata=0 queries do.
...
FossilOrigin-Name: 7bda09ab404a110d57449e149a3281fca8dc4cacf7bd9832ea2a1356ad20fe8e
2023-12-02 17:32:16 +00:00
dan
f4c2962558
Remove old code for tokendata=1 queries.
...
FossilOrigin-Name: b0a489e8e1bf0290c2117ab32d78b1cc7d67bcb226b55ec044c8367ebde3815b
2023-12-01 20:37:11 +00:00
dan
b5effc0605
Different approach to querying a tokendata=1 table. Saves cpu and memory.
...
FossilOrigin-Name: c523f40895866e6fc979a26483dbea8206126b4bbdf4b73b77263c09e13c855e
2023-12-01 20:09:59 +00:00
dan
89fcfbb424
Fix signed integer overflow in fts5.
...
FossilOrigin-Name: 60e46c7ec68fd8caaed960ca06d98fb06855b2d0bb860dd2fb7b5e89a5e9c7b4
2023-11-29 16:22:39 +00:00
dan
0d4a888485
Merge latest trunk updates into this branch.
...
FossilOrigin-Name: 554fc13f2ca5f2ebd9ad0206034c25b556ff40db3106051c5e539f2e142e88ea
2023-11-28 19:43:08 +00:00
dan
226aebae07
Fix an fts5 problem that could occur when mixing regular and secure delete operations on a single table.
...
FossilOrigin-Name: 8eb3f40021994f0d25ef9d246873796c84886e5951bb8ab991e1e2df31998484
2023-11-23 11:18:06 +00:00
dan
af54826e4a
Defer building xInstToken() hash-table until it is to be used.
...
FossilOrigin-Name: 9b005085ff4a53cda0a1dff0c836630d6d3b95b9c40658ffd2a886f3e1b37faa
2023-11-22 20:02:55 +00:00
dan
5c268bbf67
Fix tokendata=1 and xInstToken() APIs for detail=none and detail=column tables.
...
FossilOrigin-Name: 37b271c19d772bd06524db816ded03377b426efed7a7783c8a96f6fb156ecd86
2023-11-22 19:02:54 +00:00
dan
56bb07bad6
Fix an assert() in fts5 that could be true following an OOM or IO error in contentless-delete mode.
...
FossilOrigin-Name: 3fe89238c31ca163d021ef1fecde594328815aaba7053fef9e9c789562a62f45
2023-11-20 11:40:18 +00:00
drh
52c41ed41b
Adjust an assert() in fts5WritePoslistData() so that it only applies if there
...
have been no prior errors.
dbsqlfuzz 25dca9b2568f67dc78a0e32ff280133fe71994bd.
FossilOrigin-Name: 257cdbab90c6db8ccc9a8fd5df556b69c3a35a329d39cd4642c792d7359a54a5
2023-11-18 12:06:21 +00:00
dan
a0764f63a8
When querying a tokendata=1 fts5 table, do not use a prefix cursor for the case where the term has only one variant.
...
FossilOrigin-Name: d711c96ba855686d6881a50498418de3492144f005684b5ae55bca24413dce47
2023-11-16 21:11:56 +00:00
dan
50b0e25a55
Add implementation of xInstToken() API.
...
FossilOrigin-Name: a34b26fe7f60b74e7ae5cf64900920a3d352a20da2496401bcbc27041689cd07
2023-11-15 11:45:19 +00:00
dan
b4fc827c0f
Merge latest trunk into this branch.
...
FossilOrigin-Name: 3a869cf1f84b0e9bdcc4de53685430ab41eafacbba1ca7b87e727aa98811c6c5
2023-11-06 19:16:38 +00:00
dan
a3e8822c4b
Fix an fts5 problem where a transaction consisting of (a) a DELETE on rowid X, (b) a prefix query, and (c) an INSERT on rowid X, could corrupt the index.
...
FossilOrigin-Name: c2058a045b57571b2b5d342adb212fe606717c633a0422755691ae6bf5725d25
2023-11-06 18:40:25 +00:00