Remove three obsolete and unused files from tool/
FossilOrigin-Name: 0abd65294e6e8db68e7ce6724f02f17ba1cb3422
This commit is contained in:
parent
91a3ecb0ad
commit
ee38148785
15
manifest
15
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\stypo\sin\scomments.\s\sNo\schanges\sto\scode.
|
||||
D 2015-10-06T21:49:55.351
|
||||
C Remove\sthree\sobsolete\sand\sunused\sfiles\sfrom\stool/
|
||||
D 2015-10-07T00:35:18.445
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 2143eeef6d0cc26006ae5fc4bb242a4a8b973412
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -1339,7 +1339,6 @@ F test/zerodamage.test cf6748bad89553cc1632be51a6f54e487e4039ac
|
||||
F tool/build-all-msvc.bat 761d8c82a1a529261291812732a853a1b4256d85 x
|
||||
F tool/build-shell.sh 950f47c6174f1eea171319438b93ba67ff5bf367
|
||||
F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
|
||||
F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
|
||||
F tool/extract.c 054069d81b095fbdc189a6f5d4466e40380505e2
|
||||
F tool/fast_vacuum.c 5ba0d6f5963a0a63bdc42840f678bad75b2ebce1
|
||||
F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439
|
||||
@ -1363,7 +1362,6 @@ F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b
|
||||
F tool/mkvsix.tcl bbe57cd9ae11c6cc70319241101ef8d2b8c3765b
|
||||
F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
|
||||
F tool/omittest.tcl 34d7ac01fe4fd18e3637f64abe12c40eca0f6b97
|
||||
F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
|
||||
F tool/pagesig.c ff0ca355fd3c2398e933da5e22439bbff89b803b
|
||||
F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a
|
||||
F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5
|
||||
@ -1373,7 +1371,6 @@ F tool/showlocks.c 9920bcc64f58378ff1118caead34147201f48c68
|
||||
F tool/showstat4.c 9515faa8ec176599d4a8288293ba8ec61f7b728a
|
||||
F tool/showwal.c 85cb36d4fe3e93e2fbd63e786e0d1ce42d0c4fad
|
||||
F tool/soak1.tcl 8d407956e1a45b485a8e072470a3e629a27037fe
|
||||
F tool/space_used.tcl f714c41a59e326b8b9042f415b628b561bafa06b
|
||||
F tool/spaceanal.tcl 93c1fdc9733c525b17a2024c7df193daa002e037
|
||||
F tool/speedtest.tcl 06c76698485ccf597b9e7dbb1ac70706eb873355
|
||||
F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
@ -1392,7 +1389,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P 041df7c2f14b95868a08090354ebb3308050790e
|
||||
R 72391e64c737a55be96785cd3a34723b
|
||||
U mistachkin
|
||||
Z 9b5c49931764975f112a79c84d53a6bb
|
||||
P a05f903c64edeba8a9748aad68f5981943e68b3c
|
||||
R d4529eb5d734c0707e0a910200ff6fc6
|
||||
U drh
|
||||
Z 8d61b7e9a6e9a2f3b2856a04c9b6debc
|
||||
|
@ -1 +1 @@
|
||||
a05f903c64edeba8a9748aad68f5981943e68b3c
|
||||
0abd65294e6e8db68e7ce6724f02f17ba1cb3422
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
** A utility for printing the differences between two SQLite database files.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#define PAGESIZE 1024
|
||||
static int db1 = -1;
|
||||
static int db2 = -1;
|
||||
|
||||
int main(int argc, char **argv){
|
||||
int iPg;
|
||||
unsigned char a1[PAGESIZE], a2[PAGESIZE];
|
||||
if( argc!=3 ){
|
||||
fprintf(stderr,"Usage: %s FILENAME FILENAME\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
db1 = open(argv[1], O_RDONLY);
|
||||
if( db1<0 ){
|
||||
fprintf(stderr,"%s: can't open %s\n", argv[0], argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
db2 = open(argv[2], O_RDONLY);
|
||||
if( db2<0 ){
|
||||
fprintf(stderr,"%s: can't open %s\n", argv[0], argv[2]);
|
||||
exit(1);
|
||||
}
|
||||
iPg = 1;
|
||||
while( read(db1, a1, PAGESIZE)==PAGESIZE && read(db2,a2,PAGESIZE)==PAGESIZE ){
|
||||
if( memcmp(a1,a2,PAGESIZE) ){
|
||||
printf("Page %d\n", iPg);
|
||||
}
|
||||
iPg++;
|
||||
}
|
||||
printf("%d pages checked\n", iPg-1);
|
||||
close(db1);
|
||||
close(db2);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
#
|
||||
# Extract opcode documentation for sqliteVdbe.c and generate HTML
|
||||
#
|
||||
BEGIN {
|
||||
print "<html><body bgcolor=white>"
|
||||
print "<h1>SQLite Virtual Database Engine Opcodes</h1>"
|
||||
print "<table>"
|
||||
}
|
||||
/ Opcode: /,/\*\// {
|
||||
if( $2=="Opcode:" ){
|
||||
printf "<tr><td>%s %s %s %s</td>\n<td>\n", $3, $4, $5, $6
|
||||
}else if( $1=="*/" ){
|
||||
printf "</td></tr>\n"
|
||||
}else if( NF>1 ){
|
||||
sub(/^ *\*\* /,"")
|
||||
gsub(/</,"<")
|
||||
gsub(/&/,"&")
|
||||
print
|
||||
}
|
||||
}
|
||||
END {
|
||||
print "</table></body></html>"
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
# Run this TCL script using "testfixture" in order get a report that shows
|
||||
# how much disk space is used by a particular data to actually store data
|
||||
# versus how much space is unused.
|
||||
#
|
||||
|
||||
# Get the name of the database to analyze
|
||||
#
|
||||
if {[llength $argv]!=1} {
|
||||
puts stderr "Usage: $argv0 database-name"
|
||||
exit 1
|
||||
}
|
||||
set file_to_analyze [lindex $argv 0]
|
||||
|
||||
# Open the database
|
||||
#
|
||||
sqlite db [lindex $argv 0]
|
||||
set DB [btree_open [lindex $argv 0]]
|
||||
|
||||
# Output the schema for the generated report
|
||||
#
|
||||
puts \
|
||||
{BEGIN;
|
||||
CREATE TABLE space_used(
|
||||
name clob, -- Name of a table or index in the database file
|
||||
is_index boolean, -- TRUE if it is an index, false for a table
|
||||
payload int, -- Total amount of data stored in this table or index
|
||||
pri_pages int, -- Number of primary pages used
|
||||
ovfl_pages int, -- Number of overflow pages used
|
||||
pri_unused int, -- Number of unused bytes on primary pages
|
||||
ovfl_unused int -- Number of unused bytes on overflow pages
|
||||
);}
|
||||
|
||||
# This query will be used to find the root page number for every index and
|
||||
# table in the database.
|
||||
#
|
||||
set sql {
|
||||
SELECT name, type, rootpage FROM sqlite_master
|
||||
UNION ALL
|
||||
SELECT 'sqlite_master', 'table', 2
|
||||
ORDER BY 1
|
||||
}
|
||||
|
||||
# Initialize variables used for summary statistics.
|
||||
#
|
||||
set total_size 0
|
||||
set total_primary 0
|
||||
set total_overflow 0
|
||||
set total_unused_primary 0
|
||||
set total_unused_ovfl 0
|
||||
|
||||
# Analyze every table in the database, one at a time.
|
||||
#
|
||||
foreach {name type rootpage} [db eval $sql] {
|
||||
set cursor [btree_cursor $DB $rootpage 0]
|
||||
set go [btree_first $cursor]
|
||||
set size 0
|
||||
catch {unset pg_used}
|
||||
set unused_ovfl 0
|
||||
set n_overflow 0
|
||||
while {$go==0} {
|
||||
set payload [btree_payload_size $cursor]
|
||||
incr size $payload
|
||||
set stat [btree_cursor_dump $cursor]
|
||||
set pgno [lindex $stat 0]
|
||||
set freebytes [lindex $stat 4]
|
||||
set pg_used($pgno) $freebytes
|
||||
if {$payload>238} {
|
||||
set n [expr {($payload-238+1019)/1020}]
|
||||
incr n_overflow $n
|
||||
incr unused_ovfl [expr {$n*1020+238-$payload}]
|
||||
}
|
||||
set go [btree_next $cursor]
|
||||
}
|
||||
btree_close_cursor $cursor
|
||||
set n_primary [llength [array names pg_used]]
|
||||
set unused_primary 0
|
||||
foreach x [array names pg_used] {incr unused_primary $pg_used($x)}
|
||||
regsub -all ' $name '' name
|
||||
puts -nonewline "INSERT INTO space_used VALUES('$name'"
|
||||
puts -nonewline ",[expr {$type=="index"}]"
|
||||
puts ",$size,$n_primary,$n_overflow,$unused_primary,$unused_ovfl);"
|
||||
incr total_size $size
|
||||
incr total_primary $n_primary
|
||||
incr total_overflow $n_overflow
|
||||
incr total_unused_primary $unused_primary
|
||||
incr total_unused_ovfl $unused_ovfl
|
||||
}
|
||||
|
||||
# Output summary statistics:
|
||||
#
|
||||
puts "-- Total payload size: $total_size"
|
||||
puts "-- Total pages used: $total_primary primary and $total_overflow overflow"
|
||||
set file_pgcnt [expr {[file size [lindex $argv 0]]/1024}]
|
||||
puts -nonewline "-- Total unused bytes on primary pages: $total_unused_primary"
|
||||
if {$total_primary>0} {
|
||||
set upp [expr {$total_unused_primary/$total_primary}]
|
||||
puts " (avg $upp bytes/page)"
|
||||
} else {
|
||||
puts ""
|
||||
}
|
||||
puts -nonewline "-- Total unused bytes on overflow pages: $total_unused_ovfl"
|
||||
if {$total_overflow>0} {
|
||||
set upp [expr {$total_unused_ovfl/$total_overflow}]
|
||||
puts " (avg $upp bytes/page)"
|
||||
} else {
|
||||
puts ""
|
||||
}
|
||||
set n_free [expr {$file_pgcnt-$total_primary-$total_overflow}]
|
||||
if {$n_free>0} {incr n_free -1}
|
||||
puts "-- Total pages on freelist: $n_free"
|
||||
puts "COMMIT;"
|
Loading…
x
Reference in New Issue
Block a user