]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a problem in the fts5txt2db.tcl script causing it to fail when creating tables...
authordan <dan@noemail.net>
Mon, 19 Oct 2015 15:59:08 +0000 (15:59 +0000)
committerdan <dan@noemail.net>
Mon, 19 Oct 2015 15:59:08 +0000 (15:59 +0000)
FossilOrigin-Name: 68ee426a6432ac63655909ff70cb22bde33cf28c

ext/fts5/tool/fts5txt2db.tcl
manifest
manifest.uuid

index 23f607a80190d233802b91837e1c4bddf1f9a210..c22c5dae7270b7803ac5178cf9448b8030ec396d 100644 (file)
@@ -25,7 +25,7 @@ is exhausted.
   exit -1
 }
 
-set O(aColsize)       [list 10 10 10]
+set O(aColSize)       [list 10 10 10]
 set O(tblname)        t1
 set O(fts)            fts5
 
@@ -61,22 +61,7 @@ if {$i > [llength $argv]-2} usage
 set O(db) [lindex $argv $i]
 set O(files) [lrange $argv [expr $i+1] end]
 
-foreach {k v} [lrange $argv 0 end-2] {
-  switch -- $k {
-    -colsize {
-      set O(aColSize) $v
-    }
-
-    -colsize {
-      set O(aColSize) $v
-    }
-  }
-
-}
-
 sqlite3 db $O(db)
-load_static_extension db fts5
-
 
 # Create the FTS table in the db. Return a list of the table columns.
 #
@@ -84,7 +69,7 @@ proc create_table {} {
   global O
   set cols [list a b c d e f g h i j k l m n o p q r s t u v w x y z]
 
-  set nCol [llength $O(aColsize)]
+  set nCol [llength $O(aColSize)]
   set cols [lrange $cols 0 [expr $nCol-1]]
 
   set sql    "CREATE VIRTUAL TABLE IF NOT EXISTS $O(tblname) USING $O(fts) ("
@@ -117,14 +102,14 @@ set i 0
 set cols [create_table]
 set sql "INSERT INTO $O(tblname) VALUES(\$[lindex $cols 0]"
 foreach c [lrange $cols 1 end] {
-  append sql ", \$$c"
+  append sql ", \$A($c)"
 }
 append sql ")"
 
 db eval BEGIN
   while {$i < $N} {
-    foreach c $cols s $O(aColsize) {
-      set $c [lrange $tokens $i [expr $i+$s-1]]
+    foreach c $cols s $O(aColSize) {
+      set A($c) [lrange $tokens $i [expr $i+$s-1]]
       incr i $s
     }
     db eval $sql
index 955c828acef3946a086eb683e119d16e6d93c93e..2671464cd01aa20d9173948323ce555e15cd9af0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\stests\sto\scover\snew\sbranches\sadded\sto\sthe\sfts5\scode\sby\sthe\sprevious\scommit.
-D 2015-10-17T20:34:49.498
+C Fix\sa\sproblem\sin\sthe\sfts5txt2db.tcl\sscript\scausing\sit\sto\sfail\swhen\screating\stables\swith\smore\sthan\s8\scolumns.
+D 2015-10-19T15:59:08.318
 F Makefile.in 2ea961bc09e441874eb3d1bf7398e04feb24f3ee
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 4eb750e0fdf52050a06d881e1b060f4bb116ed7e
@@ -181,7 +181,7 @@ 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 c88a5554d0409494da95ba647bbdb4879b2624b0
-F ext/fts5/tool/fts5txt2db.tcl 3d19fb8ffb234031d33d7d2151acfbc55e9cfcc4
+F ext/fts5/tool/fts5txt2db.tcl c374c4c4797e8cdfadabdfaeeb5412dcd6686e84
 F ext/fts5/tool/loadfts5.tcl 58e90407cc5c2b1770460119488fd7c0090d4dd3
 F ext/fts5/tool/mkfts5c.tcl 09ce6a7997440508360f5ba1651ab7e923a8bf31
 F ext/fts5/tool/showfts5.tcl 9eaf6c3df352f98a2ab5ce1921dd94128ab1381d
@@ -1391,7 +1391,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 6020d96ab47a0bebe41f691a3f44fd55d8b2d2b7
-R 22a259a71e3233ba8022de14ef31c49b
+P cf618334a8a05a067e844236e4d461b2e5706da6
+R 30a0ced4e8757449657c5453f9890b65
 U dan
-Z d5f5675976d14f9fce086eaa482cce6e
+Z 120618455a1082447e4825d9f82b93ec
index 8e55d16504f1c4b677d272e94f54021442f2342b..0d152ea1ff79be1e7240eca16c5d8151e81d578d 100644 (file)
@@ -1 +1 @@
-cf618334a8a05a067e844236e4d461b2e5706da6
\ No newline at end of file
+68ee426a6432ac63655909ff70cb22bde33cf28c
\ No newline at end of file