Add test cases for fts4aux. Fix a bug affecting fts3 tables with multiple columns.
FossilOrigin-Name: dc511e60a65232a7087e12ff40b63506cf37a634
This commit is contained in:
parent
4c600ac389
commit
bb7e77c758
@ -302,7 +302,7 @@ static int fts3auxNextMethod(sqlite3_vtab_cursor *pCursor){
|
||||
break;
|
||||
|
||||
/* State 3. The integer just read is a column number. */
|
||||
case 3:
|
||||
default: assert( eState==3 );
|
||||
iCol = (int)v;
|
||||
if( fts3auxGrowStatArray(pCsr, iCol+2) ) return SQLITE_NOMEM;
|
||||
pCsr->aStat[iCol+1].nDoc++;
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Change\sfts4aux\sto\s(additionally)\sreport\son\sterm\sfrequency\sin\sindividual\scolumns\sof\san\sfts\stable.
|
||||
D 2011-02-04T18:56:25.115
|
||||
C Add\stest\scases\sfor\sfts4aux.\sFix\sa\sbug\saffecting\sfts3\stables\swith\smultiple\scolumns.
|
||||
D 2011-02-05T14:37:57.437
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in de6498556d536ae60bb8bb10e8c1ba011448658c
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -64,7 +64,7 @@ F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
|
||||
F ext/fts3/fts3.c 5653c5654ac9b65bf3646af7e1d695c7e9b991a0
|
||||
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
|
||||
F ext/fts3/fts3Int.h 945926ea4b6a686c3e9834640a252d9870b7191e
|
||||
F ext/fts3/fts3_aux.c 60563fe93307dbca20bafeabb28dac829bdf1520
|
||||
F ext/fts3/fts3_aux.c bd415ad320f9174ea2de776877953116480ff9ff
|
||||
F ext/fts3/fts3_expr.c 5f49e0deaf723724b08100bb3ff40aab02ad0c93
|
||||
F ext/fts3/fts3_hash.c 3c8f6387a4a7f5305588b203fa7c887d753e1f1c
|
||||
F ext/fts3/fts3_hash.h 8331fb2206c609f9fc4c4735b9ab5ad6137c88ec
|
||||
@ -454,7 +454,7 @@ F test/fts3e.test 1f6c6ac9cc8b772ca256e6b22aaeed50c9350851
|
||||
F test/fts3expr.test 5e745b2b6348499d9ef8d59015de3182072c564c
|
||||
F test/fts3expr2.test 18da930352e5693eaa163a3eacf96233b7290d1a
|
||||
F test/fts3fault.test f83e556465bb69dc8bc676339eca408dce4ca246
|
||||
F test/fts3fault2.test 5657d83759338d93ef8029518de3214c33a1c560
|
||||
F test/fts3fault2.test f275554f4a4fc7abf71e2975a9d6f4693f390526
|
||||
F test/fts3malloc.test 9c8cc3f885bb4dfc66d0460c52f68f45e4710d1b
|
||||
F test/fts3matchinfo.test cc0b009edbbf575283d5fdb53271179e0d8019ba
|
||||
F test/fts3near.test 2e318ee434d32babd27c167142e2b94ddbab4844
|
||||
@ -906,7 +906,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
P 999c915a4a075a4d1736ae786cbe7d1587809fee
|
||||
R 21ef4f44397ebadeb7dd1b381e1ac485
|
||||
P 3996f92a9aca9ac2628be003eca83c8f954c71de
|
||||
R d067548b9dfe7aa0061b3708612345ea
|
||||
U dan
|
||||
Z 2b26bcdfd659b090671de58b945f2afb
|
||||
Z d56728d64f4b8d9b1b136fd158651c94
|
||||
|
@ -1 +1 @@
|
||||
3996f92a9aca9ac2628be003eca83c8f954c71de
|
||||
dc511e60a65232a7087e12ff40b63506cf37a634
|
@ -39,7 +39,7 @@ do_faultsim_test 1.2 -prep {
|
||||
} -body {
|
||||
execsql "SELECT * FROM terms"
|
||||
} -test {
|
||||
faultsim_test_result {0 {a 1 1 b 1 1 c 2 2 d 1 1 e 1 1}}
|
||||
faultsim_test_result {0 {a * 1 1 a 0 1 1 b * 1 1 b 0 1 1 c * 2 2 c 0 2 2 d * 1 1 d 0 1 1 e * 1 1 e 0 1 1}}
|
||||
}
|
||||
|
||||
do_faultsim_test 1.3 -prep {
|
||||
@ -48,7 +48,7 @@ do_faultsim_test 1.3 -prep {
|
||||
} -body {
|
||||
execsql "SELECT * FROM terms WHERE term>'a' AND TERM < 'd'"
|
||||
} -test {
|
||||
faultsim_test_result {0 {b 1 1 c 2 2}}
|
||||
faultsim_test_result {0 {b * 1 1 b 0 1 1 c * 2 2 c 0 2 2}}
|
||||
}
|
||||
|
||||
do_faultsim_test 1.4 -prep {
|
||||
@ -57,9 +57,26 @@ do_faultsim_test 1.4 -prep {
|
||||
} -body {
|
||||
execsql "SELECT * FROM terms WHERE term='c'"
|
||||
} -test {
|
||||
faultsim_test_result {0 {c 2 2}}
|
||||
faultsim_test_result {0 {c * 2 2 c 0 2 2}}
|
||||
}
|
||||
|
||||
do_test 2.0 {
|
||||
faultsim_delete_and_reopen
|
||||
execsql {
|
||||
CREATE VIRTUAL TABLE tx USING fts4(a, b);
|
||||
INSERT INTO tx VALUES('a b c', 'x y z');
|
||||
CREATE VIRTUAL TABLE terms2 USING fts4aux(tx);
|
||||
}
|
||||
faultsim_save_and_close
|
||||
} {}
|
||||
|
||||
do_faultsim_test 2.1 -prep {
|
||||
faultsim_restore_and_reopen
|
||||
db eval {SELECT * FROM sqlite_master}
|
||||
} -body {
|
||||
execsql "SELECT * FROM terms2"
|
||||
} -test {
|
||||
faultsim_test_result {0 {a * 1 1 a 0 1 1 b * 1 1 b 0 1 1 c * 1 1 c 0 1 1 x * 1 1 x 1 1 1 y * 1 1 y 1 1 1 z * 1 1 z 1 1 1}}
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
Loading…
Reference in New Issue
Block a user