Merge the fts3-changes branch back into the trunk.
FossilOrigin-Name: b9477eb056d120826ed82b0d65e6f27b5d0c087a
This commit is contained in:
+725
-365
File diff suppressed because it is too large
Load Diff
@@ -507,9 +507,6 @@ int sqlite3Fts3TermSegReaderCursor(
|
||||
|
||||
void sqlite3Fts3EvalPhraseCleanup(Fts3Phrase *);
|
||||
|
||||
int sqlite3Fts3EvalStart(Fts3Cursor *, Fts3Expr *, int);
|
||||
int sqlite3Fts3EvalNext(Fts3Cursor *pCsr);
|
||||
|
||||
int sqlite3Fts3MsrIncrStart(
|
||||
Fts3Table*, Fts3MultiSegReader*, int, const char*, int);
|
||||
int sqlite3Fts3MsrIncrNext(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
C Changes\sto\sallow\sFTS\sto\sbe\scompiled\sas\sa\sloadable\smodule\sagain.
|
||||
D 2011-06-28T07:15:43.990
|
||||
C Merge\sthe\sfts3-changes\sbranch\sback\sinto\sthe\strunk.
|
||||
D 2011-06-28T14:16:42.198
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in c1d7a7f4fd8da6b1815032efca950e3d5125407e
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@@ -62,9 +62,9 @@ F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0
|
||||
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
|
||||
F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
|
||||
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
|
||||
F ext/fts3/fts3.c ca776037493d0081da70a6afc0df80f5ce347cb7
|
||||
F ext/fts3/fts3.c f45ad45053a587ad1c005459b704b7ade8bd504e
|
||||
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
|
||||
F ext/fts3/fts3Int.h 61c90f512b563345f9aa99c48c7afd0928de055c
|
||||
F ext/fts3/fts3Int.h e670e2c58b3dca76e44f7e7d35e61113d079db58
|
||||
F ext/fts3/fts3_aux.c 0ebfa7b86cf8ff6a0861605fcc63b83ec1b70691
|
||||
F ext/fts3/fts3_expr.c 23791de01b3a5d313d76e02befd2601d4096bc2b
|
||||
F ext/fts3/fts3_hash.c 8dd2d06b66c72c628c2732555a32bc0943114914
|
||||
@@ -456,7 +456,7 @@ F test/fts3am.test 218aa6ba0dfc50c7c16b2022aac5c6be593d08d8
|
||||
F test/fts3an.test a49ccadc07a2f7d646ec1b81bc09da2d85a85b18
|
||||
F test/fts3ao.test b83f99f70e9eec85f27d75801a974b3f820e01f9
|
||||
F test/fts3atoken.test 402ef2f7c2fb4b3d4fa0587df6441c1447e799b3
|
||||
F test/fts3auto.test f1cb0a55130897013ca5850dbee2945c2908a45a
|
||||
F test/fts3auto.test c1a30b37002b7c764a96937fbc71065b73d69494
|
||||
F test/fts3aux1.test 0b02743955d56fc0d4d66236a26177bd1b726de0
|
||||
F test/fts3b.test e93bbb653e52afde110ad53bbd793f14fe7a8984
|
||||
F test/fts3c.test fc723a9cf10b397fdfc2b32e73c53c8b1ec02958
|
||||
@@ -949,7 +949,7 @@ F tool/symbols.sh bc2a3709940d47c8ac8e0a1fdf17ec801f015a00
|
||||
F tool/tostr.awk 11760e1b94a5d3dcd42378f3cc18544c06cfa576
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings.sh 2ebae31e1eb352696f3c2f7706a34c084b28c262
|
||||
P 6c871ac1fa3c79baa0053dc49ab106cb3db4cfa0
|
||||
R 4e5d4c059d7e31bcf35d2d245a2997b7
|
||||
P 29e69f389cb0078e125ba5814a68b3fe8cf634c6 91daea7d2ec41f014fb30c6371aae447cc07f287
|
||||
R 26c661c69e309ad434e75bfd241a096d
|
||||
U dan
|
||||
Z c2844ce2a2f8548d3356adfa633cbd5b
|
||||
Z 7f90c6a2312621252bb79173b43d611c
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
29e69f389cb0078e125ba5814a68b3fe8cf634c6
|
||||
b9477eb056d120826ed82b0d65e6f27b5d0c087a
|
||||
+49
-3
@@ -107,15 +107,17 @@ proc do_fts3query_test {tn args} {
|
||||
" $matchinfo_asc
|
||||
}
|
||||
|
||||
# fts3_make_deferrable TABLE TOKEN
|
||||
# fts3_make_deferrable TABLE TOKEN ?NROW?
|
||||
#
|
||||
proc fts3_make_deferrable {tbl token} {
|
||||
proc fts3_make_deferrable {tbl token {nRow 0}} {
|
||||
|
||||
set stmt [sqlite3_prepare db "SELECT * FROM $tbl" -1 dummy]
|
||||
set name [sqlite3_column_name $stmt 0]
|
||||
sqlite3_finalize $stmt
|
||||
|
||||
set nRow [db one "SELECT count(*) FROM $tbl"]
|
||||
if {$nRow==0} {
|
||||
set nRow [db one "SELECT count(*) FROM $tbl"]
|
||||
}
|
||||
set pgsz [db one "PRAGMA page_size"]
|
||||
execsql BEGIN
|
||||
for {set i 0} {$i < ($nRow * $pgsz * 1.2)/100} {incr i} {
|
||||
@@ -653,6 +655,50 @@ foreach {tn pending create} {
|
||||
catchsql { COMMIT }
|
||||
}
|
||||
|
||||
foreach {tn create} {
|
||||
1 "fts4(x)"
|
||||
2 "fts4(x, order=DESC)"
|
||||
} {
|
||||
execsql [subst {
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE VIRTUAL TABLE t1 USING $create;
|
||||
}]
|
||||
|
||||
foreach {x} {
|
||||
"F E N O T K X V A X I E X A P G Q V H U"
|
||||
"R V A E T C V Q N I E L O N U G J K L U"
|
||||
"U Y I G W M V F J L X I D C H F P J Q B"
|
||||
"S G D Z X R P G S S Y B K A S G A I L L"
|
||||
"L S I C H T Z S R Q P R N K J X L F M J"
|
||||
"C C C D P X B Z C M A D A C X S B T X V"
|
||||
"W Y J M D R G V R K B X S A W R I T N C"
|
||||
"P K L W T M S P O Y Y V V O E H Q A I R"
|
||||
"C D Y I C Z F H J C O Y A Q F L S B D K"
|
||||
"P G S C Y C Y V I M B D S Z D D Y W I E"
|
||||
"Z K Z U E E S F Y X T U A L W O U J C Q"
|
||||
"P A T Z S W L P L Q V Y Y I P W U X S S"
|
||||
"I U I H U O F Z F R H R F T N D X A G M"
|
||||
"N A B M S H K X S O Y D T X S B R Y H Z"
|
||||
"L U D A S K I L S V Z J P U B E B Y H M"
|
||||
} {
|
||||
execsql { INSERT INTO t1 VALUES($x) }
|
||||
}
|
||||
|
||||
# Add extra documents to the database such that token "B" will be considered
|
||||
# deferrable if considering the other tokens means that 2 or fewer documents
|
||||
# will be loaded into memory.
|
||||
#
|
||||
fts3_make_deferrable t1 B 2
|
||||
|
||||
# B is not deferred in either of the first two tests below, since filtering
|
||||
# on "M" or "D" returns 10 documents or so. But filtering on "M * D" only
|
||||
# returns 2, so B is deferred in this case.
|
||||
#
|
||||
do_fts3query_test 7.$tn.1 t1 {"M B"}
|
||||
do_fts3query_test 7.$tn.2 t1 {"B D"}
|
||||
do_fts3query_test 7.$tn.3 -deferred B t1 {"M B D"}
|
||||
}
|
||||
|
||||
set sqlite_fts3_enable_parentheses $sfep
|
||||
finish_test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user