/ Check-in [e5169f9a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Enhance sqlite3_analyzer so that it is able to deal with multiplexed databases that have 8+3 filenames.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e5169f9a5b7e20b8adaf6ebb7868a64e44fd7321
User & Date: drh 2011-10-10 16:06:35
Context
2011-10-11
12:39
Fix requirements marks associate with STAT3. check-in: 9325c1a8 user: drh tags: trunk
2011-10-10
16:06
Enhance sqlite3_analyzer so that it is able to deal with multiplexed databases that have 8+3 filenames. check-in: e5169f9a user: drh tags: trunk
12:04
Fix a typo in a comment for PRAGMA journal_mode. Also amplify that same comment. check-in: c8ff2a48 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/spaceanal.tcl.

    39     39     exit 1
    40     40   }
    41     41   set true_file_size [file size $file_to_analyze]
    42     42   if {$true_file_size<512} {
    43     43     puts stderr "Empty or malformed database: $file_to_analyze"
    44     44     exit 1
    45     45   }
           46  +
           47  +# Compute the total file size assuming test_multiplexor is being used.
           48  +# Assume that SQLITE_ENABLE_8_3_NAMES might be enabled
           49  +#
           50  +set extension [file extension $file_to_analyze]
           51  +set pattern $file_to_analyze
           52  +append pattern {[0-9][0-9]}
           53  +foreach f [glob -nocomplain $pattern] {
           54  +  incr true_file_size [file size $f]
           55  +  set extension {}
           56  +}
           57  +if {[string length $extension]>=2 && [string length $extension]<=4} {
           58  +  set pattern [file rootname $file_to_analyze]
           59  +  append pattern [string range $extension 0 1]
           60  +  append pattern {[0-9][0-9]}
           61  +  foreach f [glob -nocomplain $pattern] {
           62  +    incr true_file_size [file size $f]
           63  +  }
           64  +}
    46     65   
    47     66   # Open the database
    48     67   #
    49     68   sqlite3 db $file_to_analyze
    50     69   register_dbstat_vtab db
    51     70   
    52     71   db eval {SELECT count(*) FROM sqlite_master}