Commit Graph

209 Commits

Author SHA1 Message Date
dan 2e6ca188c4 Fix a buffer overwrite in fts5 that could occur when processing a prefix
query.

FossilOrigin-Name: 92fc146bc2b781e7e2d7138b00e5ea649c6fee1c2b8449420460a1b3e5c9661b
2017-12-11 17:20:37 +00:00
drh 2c2f392dca Add interfaces sqlite3_prepare_v3() and sqlite3_prepare16_v3() with the
extra prepFlags argument.  Add the SQLITE_PREPARE_PERSISTENT option as one
bit in that argument.

FossilOrigin-Name: 4a25c5883380fe5990d8180adb58c3bdc7a3d081bc4c69cd4de3cd57074fb251
2017-06-01 00:54:35 +00:00
dan 22025ef198 Fix some problems in fts5 code detected by -fsanitize=undefined.
FossilOrigin-Name: 35f721045dfe3f82e016938ab1a668bfc37b6b57b8813cc963ef640ec82de58d
2017-05-19 12:32:32 +00:00
dan 6b4fbabd6a Do not save the state of an fts5 merge operation mid-way through an input
term, even if no previous entry for that term has caused any output. Doing so
may corrupt the FTS index.

FossilOrigin-Name: 9a2de4f05fabf7e725666fb8824ae1adad56834d7ae4f2e118375bb6f9c0ae77
2017-05-11 18:14:06 +00:00
dan 0619838c55 Fix an FTS5 bug that could cause a prefix-query without a prefix-index on a
database that contains delete-markers to return extra, non-matching, rows.

FossilOrigin-Name: 840042cb2bed2924e2263f21887317f661e5a585c4466c3af25b91ed57a6b49b
2017-04-21 16:04:18 +00:00
dan 03155f659f Update fts5 to support "<colset> : ( <expr> )" for column filtering, as well
as "<colset> : NEAR(...)" and "<colset> : <phrase>".

FossilOrigin-Name: c847543f8bb1376fef52bca72b4191162a32eb7e6c5f0cd1aa0ab116b3183396
2017-04-12 17:50:12 +00:00
dan be0bc8bb4d Have fts5 close any open blob-handle when a new savepoint is opened. This
ensures that fts5 does not prevent DROP TABLE statements (which always open a
savepoint) from succeeding.

FossilOrigin-Name: a921ada89050ce1d162fd1b0056939573635e2cec7ac0c2a99ae924b3ae593f7
2017-04-08 09:12:20 +00:00
dan 1439a1e80f Improve handling of corrupt data in fts5.
FossilOrigin-Name: 609ac1c73f7c2b48a571c178a72383996a9538fe
2017-01-06 11:55:03 +00:00
dan b3e845ba33 Fix an fts5 problem causing a crash in phrase queries where the first token of
the phrase matches one or more rows but some other token within the phrase
matches zero.

FossilOrigin-Name: e78f6f3bbf4781850960fe6741f7cba480f2c27d
2016-11-14 08:19:37 +00:00
dan 460d38f15e Fix an fts5 problem with corrupt database handling found by address-sanitizer.
FossilOrigin-Name: e22252e1da4cd9e41b970970a1c4f466aa6cc133
2016-08-13 10:34:12 +00:00
drh c73bd0a5cc Fix a harmless compiler warning in FTS5.
FossilOrigin-Name: 2ea0c8b46eefd4874f021f8dfd344be751f2034f
2016-08-11 01:24:56 +00:00
dan 882ef0b8c0 Have fts5 interpret column lists that begin with a "-" character as "match any column except" lists.
FossilOrigin-Name: e517545650631d1e8a7ee63c6646a8b183a0a894
2016-08-09 19:26:57 +00:00
mistachkin 77fac879d2 More harmless compiler warning fixes.
FossilOrigin-Name: ab69527c1608da0b668f3b49e967661dd99cc3d4
2016-04-12 20:05:06 +00:00
drh 997de998a8 Remove an unused local variable from FTS5.
FossilOrigin-Name: 0ed693c29f184223cde3b3d51f0e06273e586803
2016-03-23 15:53:45 +00:00
dan 848b190e40 Explicitly limit the size of fts5 tokens to 32768 bytes.
FossilOrigin-Name: 70fc69eed9b09159899d7cbd1416a59d04210a63
2016-03-23 15:04:00 +00:00
dan 0a2f2b546a Fix some errors in fts5 test scripts.
FossilOrigin-Name: e1ab2d376a72786098125a41c1ea8140fcbd15c6
2016-03-22 15:01:54 +00:00
drh 13969f5af0 Fix harmless compiler warnings.
FossilOrigin-Name: 25d776e4523aefeec007943fe29aa17c23ccb301
2016-03-21 22:28:51 +00:00
dan f5268268b7 Have fts5 cache the structure of its index in main memory. Use "PRAGMA data_version" to figure out when this cache should be invalidated.
FossilOrigin-Name: 902f221754f3cc6fb4ae049c135f85efce604ed3
2016-03-21 15:30:50 +00:00
dan 3c6707f72b Rearrange code so that tests pass whether SQLITE_DEBUG is defined or not.
FossilOrigin-Name: 89296a46c3b891ee0b637ff6f89d828d6e46e7b5
2016-03-21 15:18:13 +00:00
dan ef480d37dc Change the way fts5 internally allocates segment ids in order to eliminated non-determinism from the module.
FossilOrigin-Name: d6e2637df16764aa9723a30ea2eb8a631d28cb2b
2016-03-21 09:56:19 +00:00
dan c9460ab989 Fix some OOM-handling issues in the fts5 changes on this branch.
FossilOrigin-Name: 020a0bda59fe93b9361ceeed0d5a8ba4177380c8
2016-03-17 12:39:56 +00:00
dan f55fb6615b Have fts5 cache the decoded structure of fts5 indexes in memory. Use "PRAGMA data_version" to detect stale caches.
FossilOrigin-Name: 33ef2210ef19e55c8d460bfe9d3dc146034c8acc
2016-03-16 19:48:10 +00:00
dan 1bb85f3ed3 Add tests to cover untested branches in recent fts5 changes.
FossilOrigin-Name: fa0033edf6ddf3c6631fa95b343225dbc8ac9429
2016-03-10 15:12:47 +00:00
drh 6459ca0b8c Remove an unused local variable.
FossilOrigin-Name: 3c343c3d012367942037e64a9855b825cb459844
2016-03-10 14:22:42 +00:00
dan 4dbc65b29a Add an incremental optimize capability to fts5. Make the 'merge' command independent of the 'automerge' settings.
FossilOrigin-Name: 556671444c03e3afca072d0f5e9bea2657de6fd3
2016-03-09 20:54:14 +00:00
dan 4e9d0d5418 Fix a problem in fts5 where a corrupt db could lead to a (huge) buffer overread.
FossilOrigin-Name: c9a30e117f2c6c9ef0cc0c6ca5227d2961715b8f
2016-02-29 17:34:16 +00:00
dan 437a54eaba Fix an fts5 problem causing 'optimize' to corrupt the fts index under some circumstances.
FossilOrigin-Name: 251d6473f7c9ad95adbdcc49cb8eaf7c0956764b
2016-02-29 17:16:26 +00:00
drh 7ff89807e0 Fix a harmless compiler warning in FTS5.
FossilOrigin-Name: e52c90758c53cbb0f74e0d8582e4c3c1bee04150
2016-02-15 23:46:36 +00:00
drh 5d2e2f1267 Remove the unused fts5BlobCompare() routine.
FossilOrigin-Name: defc762dd11144402abd591278819768a080d5ea
2016-02-11 21:53:57 +00:00
dan 2a44b3d877 Avoid a buffer overread when reading a corrupt fts5 structure record.
FossilOrigin-Name: facbc424e555061135aced7b134bf6c19f54e484
2016-02-11 18:08:38 +00:00
dan 22e8356368 Handle parser stack overflow when parsing fts5 query expressions. Fix some compiler warnings in fts5 code.
FossilOrigin-Name: bc3f7900d5a06829d123814a5ac7b951bcfc1560
2016-02-11 17:01:32 +00:00
dan d120a1e3ab Add tests for and remove unreachable branches from fts5 in order to restore test coverage.
FossilOrigin-Name: 22589018ac3321f7bd89ce9fa69e57eae395e324
2016-02-05 21:09:26 +00:00
dan b80b8f482c Further streamlining of fts5 prefix query code.
FossilOrigin-Name: ca91bd8ac70a5b3fef127364f73ec675e58bb92c
2016-02-05 19:18:02 +00:00
dan 4786cf5a20 Further improve performance of unindexed fts5 prefix queries.
FossilOrigin-Name: c9c6457d8ea911f6cc63967127e58da3146fd3ef
2016-02-04 19:45:19 +00:00
dan eb715c62f9 Improve performance of fts5 prefix queries on detail=col tables.
FossilOrigin-Name: ca11f46db047e7f131cef3893f73824758a2076b
2016-02-03 20:04:59 +00:00
dan 735ff4a809 Enhance the performance of fts5 AND and OR queries.
FossilOrigin-Name: 62ea9e5ab8bc1a20245beebceb5ea62dcd7ec84e
2016-02-02 17:40:41 +00:00
dan 52f5d1ba6b Performance enhancement for fts5 column filter queries on detail=full tables.
FossilOrigin-Name: 13fb4aa6a87c5c6258979953da82eedc1a7bf14f
2016-01-30 19:16:11 +00:00
dan 18205c781d Further minor performance improvements and code-size reductions related to fts5 column filters on detail=col tables.
FossilOrigin-Name: b4ac61aeee976296e7719949cd4fb496147a29e8
2016-01-26 20:08:50 +00:00
dan 1c16bccb79 Improve the performance of fts5 column filters on detail=col tables.
FossilOrigin-Name: 249a2d070c34bf884a04cb248b9691e239f2871c
2016-01-26 19:30:49 +00:00
dan e9eb1593f5 Fix an fts5 problem with using both xPhraseFirst() and xPhraseFirstColumn() within a single statement in detail=col mode.
FossilOrigin-Name: 72d53699bf0dcdb9d2a22e229989d7435f061399
2016-01-23 18:51:59 +00:00
dan 8498f387be Fix a problem involving detail=col and column filters.
FossilOrigin-Name: 7558a0ad2276e91f2faced8ea405d9fdb4fa0c6e
2016-01-23 14:45:36 +00:00
dan 795502d26c Experimental performance enhancements for fts5.
FossilOrigin-Name: b5a57b812fd6a734cf2a342bf0b730ae18912d73
2016-01-22 19:48:34 +00:00
dan 6d3c2889ec Add tests for fts5. Fix a crash that can occur in fts5 if the database content is corrupted.
FossilOrigin-Name: acaf426449bf6fd3140fd63141750ff69d1119a5
2016-01-18 17:48:28 +00:00
dan 0536a07c0e Add a debugging function to print human-readable versions of fts5 detail=none leaf pages.
FossilOrigin-Name: 8358af3658d888516cdef5f8c8d89e9bdee53f91
2016-01-18 09:08:56 +00:00
mistachkin 1e38927c12 Fix a couple C99-isms in FTS5 that cause compile errors on MSVC.
FossilOrigin-Name: 584848d4396d7755027fab377c97e40fbcc90d21
2016-01-15 05:39:55 +00:00
drh 0ea94db612 Yet another change to FTS5 trying to get it to merge successfully into sessions.
FossilOrigin-Name: 8dedff3b9ac3e6bf9c131fee19f7d26dc1ebd61f
2016-01-14 14:33:36 +00:00
dan 17535393b9 Fix another compiler warning in fts5 code.
FossilOrigin-Name: d17bc2c92f4d086280e49a3cc72993be7fee2da7
2016-01-14 14:19:50 +00:00
dan f705e9deab Fix compiler warnings in fts5.
FossilOrigin-Name: 5a343cc0336bba056df4449e6cd2e3fb9e75a105
2016-01-14 14:15:54 +00:00
dan fd7601a125 Improve performance of fts5 low level iterators.
FossilOrigin-Name: bc5118f40a11f64ffb4e1c086277fa80b9764745
2016-01-12 19:28:51 +00:00
dan 4364e5c9f7 Fix an fts5 problem involving detail=none, "ORDER BY rowid DESC" and deleted items. Also add tests to verify that the documented operator precedences are correct.
FossilOrigin-Name: 8d05cfd48db1462dfd3efd502d53bd33214403fb
2016-01-06 18:53:57 +00:00