Commit Graph

78 Commits

Author SHA1 Message Date
mistachkin
52b1dbb5fc Allow the 'testfixture.exe' target to be compiled with the __stdcall calling convention.
FossilOrigin-Name: e8be3dfeabaa31b3490793cf8230faae1204be15
2016-07-28 14:37:04 +00:00
mistachkin
049d487e2e Modify several extensions to use the new exported function naming. Fix some shared library compilation issues.
FossilOrigin-Name: f2ab8747825ab5131ffab174aa0ffe5e474f6811
2013-07-04 23:53:56 +00:00
mistachkin
48864df97d Many spelling fixes in comments. No changes to code.
FossilOrigin-Name: 6f6e2d50941e444ebc83604daddcc034137a05b7
2013-03-21 21:20:32 +00:00
drh
8749c1831a Make sure substructure elements have proper alignment in the ICU tokenizers
of FTS2 and FTS3.

FossilOrigin-Name: aaa2d9b0db74d8452d9294de17cff786ab4ec7c8
2012-10-19 02:10:53 +00:00
mistachkin
d5578433ff Fix all known instances of 'repeated the' style typos in comments. No changes to code.
FossilOrigin-Name: 9b19b847533f944f289d93dcdba29c0d67bf251c
2012-08-25 10:01:29 +00:00
drh
9fe5b85d36 Remove additional occurrences of <ctype.h> from FTS2.
FossilOrigin-Name: ee52589c80a6d37dc8c7a86a0e3b531ec4dd8d45
2010-09-17 17:10:31 +00:00
drh
f2fcd0750b Completely remove all trace of ctype.h from FTS2.
FossilOrigin-Name: 876845661a944ec1c841d1e2486d070efb76e5cd
2010-09-17 01:07:53 +00:00
shane
be21779385 Corrected typos and misspellings. Ticket #3702. (CVS 6336)
FossilOrigin-Name: 6404afa0c515a6536fc2e878d4fb451e4dc06942
2009-03-05 04:20:31 +00:00
drh
b39187ae89 Additional test cases and cleanup of FTS3 parenthesis processing. (CVS 6094)
FossilOrigin-Name: afac4293000f81410d105a99956605bf7102fa62
2009-01-01 12:34:45 +00:00
danielk1977
78d41832fc Fix a bug in icuOpen() in fts2. (CVS 6038)
FossilOrigin-Name: b9c722bd96b44e0fabd1564ddd982d2aabb7047c
2008-12-18 05:30:26 +00:00
shess
7fdb522caf Backport http://www.sqlite.org/cvstrac/chngview?cn=5489 from fts3.
Re-used prepared statement from fts2 cursor. (CVS 5499)

FossilOrigin-Name: 02870ed21dae2601a656b2f30c3ca0041e9cb60f
2008-07-29 20:38:17 +00:00
shess
25192cac24 Be a bit more susicious of invalid results from the tokenizer.
Backports check-in (4514) from fts3. (CVS 5459)

FossilOrigin-Name: 311aeb9c2b75c420a37198a93e353c72e9166747
2008-07-22 23:54:50 +00:00
shess
db94e39b07 Implement optimize() function.
Backports check-in (5417) from fts3. (CVS 5458)

FossilOrigin-Name: c16900dc7603cab30f8729b25361bc88bb37ae43
2008-07-22 23:49:44 +00:00
shess
08904673c8 Delete all fts2 index data the table becomes empty.
Backports check-in (5413) from fts3. (CVS 5457)

FossilOrigin-Name: 4c98179be258319f441ae4e123cf59af77e96409
2008-07-22 23:41:26 +00:00
shess
3d373110f0 fts2 functions for testing scripts.
Backports (5340) from fts3. (CVS 5456)

FossilOrigin-Name: 4e47394be9dfbf0f9309e55eb6c6a3a517ea2006
2008-07-22 23:32:27 +00:00
shess
deca811cb5 Change prefix search from O(N*M) to O(NlogM).
Backports (4599) from fts3. (CVS 5455)

FossilOrigin-Name: 3f614453d2d7c753a5963b027fe8618b50b4f6b9
2008-07-22 23:08:40 +00:00
shess
b2822a2b5e Changes fts2 to use only sqlite3_malloc() and not system malloc.
Backports (4554) and (4555) from fts3. (CVS 5454)

FossilOrigin-Name: ecf2dec66cb979cb7d8db3b7ce5c64cab57fe2bb
2008-07-22 22:57:54 +00:00
shess
29647900e2 fts2.c buildTerms() passes -1 for nInput.
Backports (4511) from fts3. (CVS 5453)

FossilOrigin-Name: d562515e1cdd05212674516033c64b5f5668b799
2008-07-22 22:20:50 +00:00
shess
4249b3f539 Cleanup the hash functions in FTS2.
Backports (4440) from fts3. (CVS 5452)

FossilOrigin-Name: e31d2f875c13ee41742c9aaee6291662cdbbf863
2008-07-22 22:15:47 +00:00
drh
8a29dfdea0 Remove all instances of sprintf() from the FTS modules. Ticket #3049. (CVS 4996)
FossilOrigin-Name: 062bf5d44d53ae0ee2bf96eddcc8de09157aa789
2008-04-12 13:06:09 +00:00
drh
85b623f2f9 Change all instances of "it's" in comments to either "its" or "it is",
as appropriate, in case the comments are ever again read by a pedantic
grammarian.  Ticket #2840. (CVS 4629)

FossilOrigin-Name: 4e91a267febda572e7239f0f1cc66b3102558c36
2007-12-13 21:54:09 +00:00
drh
a6f46e991e Do not require SQLITE_ENABLE_BROKEN_FTS2 if FTS2 is not enabled.
The same for FTS1.  Ticket #2777. (CVS 4556)

FossilOrigin-Name: f94cdcfd1171fd110ed9cd4c47f1fb5fa7e99ca9
2007-11-23 18:06:23 +00:00
shess
cd7274ceb0 Don't do anything when input doclists are both empty. Ticket #2774 (CVS 4546)
FossilOrigin-Name: 75cb46f82a6a95dbe9e279dede299bafa2e91cae
2007-11-16 00:23:07 +00:00
shess
961303c1e7 Drop the forced error from fts3.c and add forced errors to fts2.c and
fts1.c. (CVS 4427)

FossilOrigin-Name: fec6567a0f8a868cda9bba2a473491dfb17b6c88
2007-09-13 18:16:08 +00:00
shess
27a770e044 Fix memory leak of InteriorReader.term. Comes up when doing queries
against large segments. (CVS 4315)

FossilOrigin-Name: 6c617bd89fc57881a2a308a6360e8ebb42835d46
2007-08-28 20:36:53 +00:00
shess
9fa502205d Convert fts2 to use sqlite3_prepare_v2() to prevent certain logic
errors around SQLITE_SCHEMA handling.  This also allows
sql_step_statement() and sql_step_leaf_statement() to be replaced with
sqlite3_step().

Also fix a logic error in flushPendingTerms() which was clearing the
term table in case of error.  This was wrong in the face of
SQLITE_SCHEMA.  Even though the change to sqlite3_prepare_v2() should
cause us not to see SQLITE_SCHEMA any longer, it was still a logic
error... (CVS 4205)

FossilOrigin-Name: 16730cb137eaf576b87cdc17913564c9c5c0ed82
2007-08-10 23:47:03 +00:00
drh
e6e4d6bb1a Fix some compiler warnings. (CVS 4196)
FossilOrigin-Name: 6cc15409ad6baefbe6e2214a4ac1cb3a0433f922
2007-08-05 23:52:05 +00:00
rse
e21733baa5 Fix ticket #2439: the FTS1 and FTS2 extensions use the non-standard,
unportable and highly deprecated <malloc.h> header on all platforms
except Apple Mac OS X. The <malloc.h> actually is never required on
any OS with an at least partly POSIX-conforming API as the malloc(3) &
friends functions officially live in <stdlib.h> since over 10 years.
Under some platform like FreeBSD the inclusion of <malloc.h> since a few
years even causes an "#error" and this way a build failure. So, just get
rid of the bad <malloc.h> usage in FTS1 and FTS2 extensions at all and
stick with <stdlib.h> there only. (CVS 4191)

FossilOrigin-Name: 3f9a666143a8aafa0b1a5d56ec68f69f2b3d6a21
2007-07-30 18:55:36 +00:00
danielk1977
ab9749ebb9 Modify handling of SQLITE_SCHEMA in fts2 code. An SQLITE_SCHEMA error may cause SQLite to reload the internal schema, deleting and recreating v-table objects. So the sqlite3_vtab structure can be deleted out from under a v-table implementation. (CVS 4151)
FossilOrigin-Name: dee1a0fd28e8341af6523ab0c5628b671d7d2811
2007-07-02 10:16:49 +00:00
danielk1977
c033b64276 Implement xRename() for fts2 so that it is possible to rename fts2 tables. (CVS 4143)
FossilOrigin-Name: 488474fde753c5a7a14ed8f2fad7f16efd236491
2007-06-27 16:26:07 +00:00
danielk1977
9ff802627a Reorganize comments in fts2_tokenizer.h. No code changes. (CVS 4132)
FossilOrigin-Name: b331e30395e9fc90abe40ab802972a67648cf48e
2007-06-26 12:54:07 +00:00
danielk1977
08ada518ff Remove the unused EXTSRC variable from the non-configure makefile. (CVS 4129)
FossilOrigin-Name: bbdcf372c6f2144a62fba742b3f4bd6b2fe58593
2007-06-26 10:56:40 +00:00
danielk1977
4877ef2aae Fix an unitialized variable in fts2. (CVS 4128)
FossilOrigin-Name: c349cf942534357955f80fc2aa8c96206af97b78
2007-06-26 10:55:01 +00:00
danielk1977
576d3db541 Modify the non-configure build system to make it easier to build the library with the fts2 or icu extensions linked in. (CVS 4121)
FossilOrigin-Name: 02b23c4394da7efb82e9318146f10818b0f68b1f
2007-06-25 14:28:48 +00:00
drh
397aa141ed Put #ifdefs in fts2_tokenizer so that the build works even when FTS2
is omitted.  Add the SQLite blessing to the header comments on all FTS2
source files. (CVS 4120)

FossilOrigin-Name: c795e6fd8f01bcbc1967062632c13d4952abf4d8
2007-06-25 13:50:03 +00:00
drh
5665b3ea44 All the use of MySQL-style quoting in the FTS modules. Ticket #2446. (CVS 4119)
FossilOrigin-Name: 3be2a6d1c342454d93b05c38f3d9a960ab15dae2
2007-06-25 12:49:05 +00:00
danielk1977
46760820a1 Add a test that calls fts2_tokenizer() with an argument set via C code. (CVS 4118)
FossilOrigin-Name: fbcf2d75cd2b88d175c122477aa483f0771870e5
2007-06-25 12:05:40 +00:00
danielk1977
f86643b32f Add some tests for the fts2 icu tokenizer. (CVS 4117)
FossilOrigin-Name: b79ced3e0a26b0db13613073c847c2d2ba7e174e
2007-06-25 11:24:38 +00:00
danielk1977
24e1afa222 Add some documentation for user-defined fts2 tokenizers. (CVS 4116)
FossilOrigin-Name: 5a9eee86587219a68655d548864d129edec969ae
2007-06-25 09:52:31 +00:00
danielk1977
832a58a68c Extend fts2 so that user defined tokenizers may be added. Add a tokenizer that uses the ICU library if available. Documentation and tests to come. (CVS 4108)
FossilOrigin-Name: 68677e420c744b39ea9d7399819e0f376748886d
2007-06-22 15:21:15 +00:00
danielk1977
86889fc3c6 Fix snippet generation when the left-most column of an fts2 table is used in the MATCH clause. Fix for ticket #2429. (CVS 4095)
FossilOrigin-Name: fec56ad2ede53e3e202d9ad869a059eeb315796f
2007-06-20 06:23:54 +00:00
shess
401b80656d Minor comment edits from my prefix development client. No code changes. (CVS 4058)
FossilOrigin-Name: 6953cd0935b5526756ab745545420e40adc3c56d
2007-06-12 18:20:04 +00:00
shess
8a7de08a8b Fix overzealous fts2 assertions WRT rowid 0 or lower. Only check that
docids are ascending if there was a prior docid set for the doclist,
ignore the initial docid of 0. (CVS 4026)

FossilOrigin-Name: ed3a131f1d3fe51d1e79bdfe1bfafa55f825afa9
2007-05-21 21:59:18 +00:00
shess
290283fe69 Enable prefix-search in query-parsing and snippet generation. If the
character immediately after the end of a term is '*', that term is
marked for prefix matching.  Modify term comparison in
snippetOffsetsOfColumn() to respect isPrefix.  fts2n.test runs prefix
searching through some obvious test cases. (CVS 3893)

FossilOrigin-Name: 7c4c65924035d9f260f6b64eb92c5c6cf6c04b7b
2007-05-01 18:25:52 +00:00
shess
cc3e986643 Modify loadSegmentLeavesInt() to correctly handle prefix searching.
The new function docListUnion() is used to accumulate a union of the
hits for the matching terms, which will be merged across segments
using docListMerge(). (CVS 3891)

FossilOrigin-Name: 72c796307338c2751a91c30f6fb16989afbf3816
2007-05-01 17:14:59 +00:00
shess
0b6212090f Propagate prefix flag through implementation of doclist query code.
Also implement correct prefix-handling for traversal of interior nodes
of segment tree.  A given prefix can span multiple children of an
interior node, and from there the branches need to be followed in
parallel. (CVS 3889)

FossilOrigin-Name: cae844a01a1d87ffb00bba8b4e7b62a92e633aa9
2007-04-30 22:09:36 +00:00
shess
f055154108 Lift docListMerge() call out of loadSegmentLeavesInt() for prefix
search.  Doclists from multiple prefix matches will need a union merge
function, which will have to logically happen across a segment before
doclists are merged between segments. (CVS 3887)

FossilOrigin-Name: 7ddb82668906e33e2d6a796f2da1795032e036d5
2007-04-30 17:52:51 +00:00
shess
8ffcadb57e Break interior-node and leaf-node readers apart in loadSegment().
Previously, the code looped until the block was a leaf node as
indicated by a leading NUL.  Now the code loops until it finds a block
in the range of leaf nodes for this segment, then reads it using
LeavesReader.  This will make it easier to traverse a range of leaves
when doing a prefix search. (CVS 3884)

FossilOrigin-Name: 9466367d65f43d58020e709428268dc2ff98aa35
2007-04-27 22:02:57 +00:00
shess
ac7b2dd518 Lift code to traverse interior nodes out of loadSegment().
Refactoring towards prefix searching. (CVS 3882)

FossilOrigin-Name: 25935db73877c0cb132acb30c2fed2544d0e5e32
2007-04-27 21:24:18 +00:00
shess
1c7ebb0805 Refactor fts2 loadSegmentLeaf() in preparation for prefix-searching.
Prefix-searching will want to accumulate data across multiple leaves
in the segment, using LeavesReader instead of LeafReader is the first
step in that direction. (CVS 3881)

FossilOrigin-Name: 22ffdae4b6f3d0ea584dafa5268af7aa6fdcdc6e
2007-04-27 21:01:59 +00:00