From: drh Date: Wed, 21 Sep 2011 20:10:42 +0000 (+0000) Subject: Minor tweaks to the TCL code for sqlite3_analyzer. X-Git-Tag: version-3.7.9~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=565621a57e596d534806480b42dc25fe2779229e;p=thirdparty%2Fsqlite.git Minor tweaks to the TCL code for sqlite3_analyzer. FossilOrigin-Name: 3a261f383f11d839d3a23d454b4422298bef9c88 --- diff --git a/manifest b/manifest index 9d24438730..0323ff0b9a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\sunnecessary\sdependencies\sfrom\sthe\ssqlite3_analyzer\stargets\sin\nmakefiles. -D 2011-09-21T18:29:49.463 +C Minor\stweaks\sto\sthe\sTCL\scode\sfor\ssqlite3_analyzer. +D 2011-09-21T20:10:42.584 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in b6c543a666dbd1eaad06c3705778e75231c0e297 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -952,7 +952,7 @@ F tool/showjournal.c b62cecaab86a4053d944c276bb5232e4d17ece02 F tool/showwal.c f09e5a80a293919290ec85a6a37c85a5ddcf37d9 F tool/soak1.tcl 8d407956e1a45b485a8e072470a3e629a27037fe F tool/space_used.tcl f714c41a59e326b8b9042f415b628b561bafa06b -F tool/spaceanal.tcl fe02dede3d29ef0fefcf80a685644fdf4d9a768e +F tool/spaceanal.tcl 537f35d9e432695990ec855314d72eba9b999fe4 F tool/speedtest.tcl 06c76698485ccf597b9e7dbb1ac70706eb873355 F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff @@ -963,7 +963,7 @@ F tool/symbols.sh caaf6ccc7300fd43353318b44524853e222557d5 F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings.sh b7fdb2cc525f5ef4fa43c80e771636dd3690f9d2 -P 256cdbdc810cae23388ccf73583c591304294dbb -R 9e70a6e80548512d02d33e2ddd01332b +P 0bd8fd352d290637d8c4d4fb76e8dd28f0149fa0 +R fe88c011dfd8ce1303bfab126d559106 U drh -Z 8142f1a978344d0179d691a7e8574898 +Z f9ab27a8b8af4fdd9533127fd7d4648e diff --git a/manifest.uuid b/manifest.uuid index 5b0b626668..f6dca2ce1a 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -0bd8fd352d290637d8c4d4fb76e8dd28f0149fa0 \ No newline at end of file +3a261f383f11d839d3a23d454b4422298bef9c88 \ No newline at end of file diff --git a/tool/spaceanal.tcl b/tool/spaceanal.tcl index 52e825b798..bb5c1a0c3c 100644 --- a/tool/spaceanal.tcl +++ b/tool/spaceanal.tcl @@ -35,8 +35,7 @@ sqlite3 db $file_to_analyze register_dbstat_vtab db set pageSize [db one {PRAGMA page_size}] - -#set DB [btree_open $file_to_analyze 1000 0] +db eval {SELECT count(*) FROM sqlite_master} # In-memory database for collecting statistics. This script loops through # the tables and indices in the database being analyzed, adding a row for each @@ -66,11 +65,10 @@ mem eval $tabledef # Create a temporary "dbstat" virtual table. # -db eval { - CREATE VIRTUAL TABLE temp.stat USING dbstat; - CREATE TEMP TABLE dbstat AS SELECT * FROM temp.stat ORDER BY name, path; - DROP TABLE temp.stat; -} +db eval {CREATE VIRTUAL TABLE temp.stat USING dbstat} +db eval {CREATE TEMP TABLE dbstat AS SELECT * FROM temp.stat + ORDER BY name, path} +db eval {DROP TABLE temp.stat} proc isleaf {pagetype is_index} { return [expr {$pagetype == "leaf" || ($pagetype == "internal" && $is_index)}]