Fix fts5vocab.test so that it works with detail=none tables.
FossilOrigin-Name: d9135cc723fc4227aace6dcf4ffa4630c9d23aa0
This commit is contained in:
parent
2598b833f0
commit
4ca02079cf
@ -23,8 +23,6 @@ ifcapable !fts5 {
|
||||
|
||||
foreach_detail_mode $testprefix {
|
||||
|
||||
if {[detail_is_none]} continue
|
||||
|
||||
proc null_list_entries {iFirst nInterval L} {
|
||||
for {set i $iFirst} {$i < [llength $L]} {incr i $nInterval} {
|
||||
lset L $i {}
|
||||
@ -32,13 +30,6 @@ proc null_list_entries {iFirst nInterval L} {
|
||||
return $L
|
||||
}
|
||||
|
||||
proc null_insert {iFirst nInterval L} {
|
||||
for {set i $iFirst} {$i < [llength $L]} {incr i $nInterval} {
|
||||
lset L $i {}
|
||||
}
|
||||
return $L
|
||||
}
|
||||
|
||||
proc star_from_row {L} {
|
||||
if {[detail_is_full]==0} {
|
||||
set L [null_list_entries 2 3 $L]
|
||||
@ -57,6 +48,15 @@ proc star_from_col {L} {
|
||||
return $L
|
||||
}
|
||||
|
||||
proc row_to_col {L} {
|
||||
if {[detail_is_none]==0} { error "this is for detail=none mode" }
|
||||
set ret [list]
|
||||
foreach {a b c} $L {
|
||||
lappend ret $a {} $b {}
|
||||
}
|
||||
set ret
|
||||
}
|
||||
|
||||
do_execsql_test 1.1.1 {
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(one, prefix=1, detail=%DETAIL%);
|
||||
CREATE VIRTUAL TABLE v1 USING fts5vocab(t1, 'row');
|
||||
@ -140,6 +140,9 @@ set res_col [star_from_col {
|
||||
g a 5 7 g b 5 7
|
||||
x a 1 1 y b 1 1
|
||||
}]
|
||||
if {[detail_is_none]} {
|
||||
set res_col [row_to_col $res_row]
|
||||
}
|
||||
|
||||
foreach {tn tbl resname} {
|
||||
1 "fts5vocab(tt, 'col')" res_col
|
||||
@ -314,6 +317,7 @@ foreach {term} {
|
||||
|
||||
set resc [star_from_col $resc]
|
||||
set resr [star_from_row $resr]
|
||||
if {[detail_is_none]} { set resc [row_to_col $resr] }
|
||||
do_execsql_test 7.$term.1 {SELECT * FROM txc WHERE term=$term} $resc
|
||||
do_execsql_test 7.$term.2 {SELECT * FROM txr WHERE term=$term} $resr
|
||||
}
|
||||
@ -378,10 +382,12 @@ do_execsql_test 7.3.1 {
|
||||
SELECT count(*) FROM txr, txr_c WHERE txr.term = txr_c.term;
|
||||
} {30}
|
||||
|
||||
do_execsql_test 7.3.2 {
|
||||
SELECT count(*) FROM txc, txc_c
|
||||
WHERE txc.term = txc_c.term AND txc.col=txc_c.col;
|
||||
} {57}
|
||||
if {![detail_is_none]} {
|
||||
do_execsql_test 7.3.2 {
|
||||
SELECT count(*) FROM txc, txc_c
|
||||
WHERE txc.term = txc_c.term AND txc.col=txc_c.col;
|
||||
} {57}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Update\sthe\sfts5vocab\smodule\sto\swork\swith\sdetail=col\sand\sdetail=none\stables.
|
||||
D 2016-01-07T20:07:41.638
|
||||
C Fix\sfts5vocab.test\sso\sthat\sit\sworks\swith\sdetail=none\stables.
|
||||
D 2016-01-08T07:53:09.125
|
||||
F Makefile.in 7c8cc4c2f0179efc6fa9492141d1fb65f4807054
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc e45d8b9b56dfa3f2cd860b2c28bd9d304513b042
|
||||
@ -179,7 +179,7 @@ F ext/fts5/test/fts5unicode2.test c1dd890ba32b7609adba78e420faa847abe43b59
|
||||
F ext/fts5/test/fts5unicode3.test 35c3d02aa7acf7d43d8de3bfe32c15ba96e8928e
|
||||
F ext/fts5/test/fts5unindexed.test e9539d5b78c677315e7ed8ea911d4fd25437c680
|
||||
F ext/fts5/test/fts5version.test 978f59541d8cef7e8591f8be2115ec5ccb863e2e
|
||||
F ext/fts5/test/fts5vocab.test f4ff3ba4036a83678f2a8ba8b89eb303bebc122e
|
||||
F ext/fts5/test/fts5vocab.test e4b12f238f113795615ba6343b63fb326d6a360e
|
||||
F ext/fts5/tool/fts5txt2db.tcl c374c4c4797e8cdfadabdfaeeb5412dcd6686e84
|
||||
F ext/fts5/tool/loadfts5.tcl 4cc2d6af43b58d4fac05bc4fdabd0e5862c3b2c1
|
||||
F ext/fts5/tool/mkfts5c.tcl d1c2a9ab8e0ec690a52316f33dd9b1d379942f45
|
||||
@ -1409,7 +1409,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P 625695b3d7d4eae7536b5f761b96cd7519ac6ada
|
||||
R 276342437a8f737c3f32b7f1a4e61d27
|
||||
P eedd095dc1c81ce45df00093ba237dd7b3cdff3d
|
||||
R bd0f99ecb522e0859c1abeb3e9044459
|
||||
U dan
|
||||
Z 8c87f6adf59add172dd12da497a3ce1f
|
||||
Z 0717ee91389ddd999cbabbcc60656596
|
||||
|
@ -1 +1 @@
|
||||
eedd095dc1c81ce45df00093ba237dd7b3cdff3d
|
||||
d9135cc723fc4227aace6dcf4ffa4630c9d23aa0
|
Loading…
x
Reference in New Issue
Block a user