]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Update the schemalint.tcl script so that the argument to a -select option may be...
authordan <dan@noemail.net>
Fri, 22 Jan 2016 14:32:20 +0000 (14:32 +0000)
committerdan <dan@noemail.net>
Fri, 22 Jan 2016 14:32:20 +0000 (14:32 +0000)
FossilOrigin-Name: d4e37767671dc946b8a21d0158fc3044e36f0c7e

manifest
manifest.uuid
tool/schemalint.tcl

index 7fe67fd96f639349a1e65962a1eb80de168ebf0f..cc75817d97ceca4405f6dd1fd02a2e1c32ef4d83 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sa\srule\sto\smain.mk\sto\sbuild\sthe\sschemalint.tcl\sscript\sinto\san\sexecutable.\sSimilar\sto\sthe\sway\sthe\ssqlite3_analyzer\sexecutable\sis\sbuilt.
-D 2015-11-30T19:16:00.031
+C Update\sthe\sschemalint.tcl\sscript\sso\sthat\sthe\sargument\sto\sa\s-select\soption\smay\sbe\seither\san\sSQL\sstatement\sor\sthe\sname\sof\sa\sfile\scontaining\san\sSQL\sstatement
+D 2016-01-22T14:32:20.666
 F Makefile.in d828db6afa6c1fa060d01e33e4674408df1942a1
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc e928e68168df69b353300ac87c10105206653a03
@@ -1381,7 +1381,7 @@ F tool/replace.tcl 7727c60a04299b65a92f5e1590896fea0f25b9e0
 F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a
 F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5
 F tool/run-speed-test.sh 0ae485af4fe9f826e2b494be8c81f8ca9e222a4a
-F tool/schemalint.tcl 045481a427ecdb72d11a0b0ef8725e7b892a09b9
+F tool/schemalint.tcl 7b94e303b02d1b1724c56201ed9fa2845dc8d3a5
 F tool/showdb.c d4476e000a64eca9f5e2c2f68741e747b9778e8d
 F tool/showjournal.c 5bad7ae8784a43d2b270d953060423b8bd480818
 F tool/showlocks.c 9920bcc64f58378ff1118caead34147201f48c68
@@ -1406,7 +1406,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 451e0fafbe5b7e9c67d9b584d5e16796c3196881
-R 8aa86746f90305c3990fbec7bea3f626
+P b8251065db9dbe5463490316baa09dc636551377
+R 6851215977a26ab67201b1a70341660d
 U dan
-Z e9b16724c3379c54748ede3fe8135436
+Z 63a5088a2207bef48ca5ab65d0652925
index d7238464305b327170f542dfc3d6d109acf2cc1d..3a22438944c6d59d87e9fd14e388d8163bfd173f 100644 (file)
@@ -1 +1 @@
-b8251065db9dbe5463490316baa09dc636551377
\ No newline at end of file
+d4e37767671dc946b8a21d0158fc3044e36f0c7e
\ No newline at end of file
index 99e347666123bb6e6a120e1b084f94b4bfa09841..2755ba88280d5f8bbbf1e9a9bfe1f211722f3935 100644 (file)
@@ -47,6 +47,13 @@ proc list_to_sql {L} {
   join $ret ", "
 }
 
+proc readfile {zFile} {
+  set fd [open $zFile]
+  set data [read $fd]
+  close $fd
+  return $data
+}
+
 proc process_cmdline_args {ctxvar argv} {
   upvar $ctxvar G
   set nArg [llength $argv]
@@ -58,7 +65,12 @@ proc process_cmdline_args {ctxvar argv} {
       -select {
         incr i
         if {$i>=[llength $argv]-1} usage
-        lappend G(lSelect) [lindex $argv $i]
+        set zSelect [lindex $argv $i]
+        if {[file readable $zSelect]} {
+          lappend G(lSelect) [readfile $zSelect]
+        } else {
+          lappend G(lSelect) $zSelect
+        }
       }
       -verbose {
         set ::VERBOSE 1