Add a -detail option to the loadfts5.tcl script. For creating tables with the detail= option set.

FossilOrigin-Name: 81e830e21f81b6428209afa0b8f42f2fd9bd7aab
This commit is contained in:
dan 2016-01-20 16:36:10 +00:00
parent 30908c97ac
commit bd5af9ea31
3 changed files with 17 additions and 7 deletions

View File

@ -49,6 +49,7 @@ proc usage {} {
puts stderr " -prefix PREFIX (comma separated prefix= argument)"
puts stderr " -trans N (commit after N inserts - 0 == never)"
puts stderr " -hashsize N (set the fts5 hashsize parameter to N)"
puts stderr " -detail MODE (detail mode for fts5 tables)"
exit 1
}
@ -61,6 +62,7 @@ set O(crisismerge) -1
set O(prefix) ""
set O(trans) 0
set O(hashsize) -1
set O(detail) full
if {[llength $argv]<2} usage
set nOpt [expr {[llength $argv]-2}]
@ -113,6 +115,11 @@ for {set i 0} {$i < $nOpt} {incr i} {
set O(hashsize) [lindex $argv $i]
}
-detail {
if { [incr i]>=$nOpt } usage
set O(detail) [lindex $argv $i]
}
default {
usage
}
@ -129,6 +136,9 @@ db eval "PRAGMA page_size=4096"
db eval BEGIN
set pref ""
if {$O(prefix)!=""} { set pref ", prefix='$O(prefix)'" }
if {$O(vtab)=="fts5"} {
append pref ", detail=$O(detail)"
}
catch {
db eval "CREATE VIRTUAL TABLE t1 USING $O(vtab) (path, content$O(tok)$pref)"
db eval "INSERT INTO t1(t1, rank) VALUES('pgsz', 4050);"

View File

@ -1,5 +1,5 @@
C Fix\sa\sproblem\sin\sautoconf/configure.ac\scausing\s--enable-readline\sto\sfail\sif\slibedit\swas\snot\spresent.
D 2016-01-20T15:19:56.944
C Add\sa\s-detail\soption\sto\sthe\sloadfts5.tcl\sscript.\sFor\screating\stables\swith\sthe\sdetail=\soption\sset.
D 2016-01-20T16:36:10.587
F Makefile.in a476545d0c8626224d0bacac85c6e2967474af81
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 01e855f958932d0d3ed62ec675fc63e2cef61fcb
@ -190,7 +190,7 @@ F ext/fts5/test/fts5version.test 978f59541d8cef7e8591f8be2115ec5ccb863e2e
F ext/fts5/test/fts5vocab.test 480d780aa6b699816c5066225fbd86f3a0239477
F ext/fts5/tool/fts5speed.tcl aaee41894b552df8fbf8616aad003b2ea9ba3221
F ext/fts5/tool/fts5txt2db.tcl c374c4c4797e8cdfadabdfaeeb5412dcd6686e84
F ext/fts5/tool/loadfts5.tcl 4cc2d6af43b58d4fac05bc4fdabd0e5862c3b2c1
F ext/fts5/tool/loadfts5.tcl 95b03429ee6b138645703c6ca192c3ac96eaf093
F ext/fts5/tool/mkfts5c.tcl d1c2a9ab8e0ec690a52316f33dd9b1d379942f45
F ext/fts5/tool/showfts5.tcl d54da0e067306663e2d5d523965ca487698e722c
F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43
@ -1419,7 +1419,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 204432ee72fda8e82d244c4aa18de7ec4811b8e1
R 88c735abd00a694aa5831ac3200d7df4
P e8adeb64d4e463772feb58dbd6f00715b92e735c
R 98a9c0dcd39e5c05ab4c041a240f6511
U dan
Z 23cee0c6751a379626b5009d557e2a86
Z b7cb5f97fd28535e6bf47b6d39323aaf

View File

@ -1 +1 @@
e8adeb64d4e463772feb58dbd6f00715b92e735c
81e830e21f81b6428209afa0b8f42f2fd9bd7aab