SQLite

Check-in [6f2010c862]
Login

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

Overview
Comment:Change dbstatus.test to account for the fact that the value reported by DBSTATUS_SCHEMA_USED may be slightly lower than the actual memory used on osx
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6f2010c862105a113b55e90018b86a9ece298d4d
User & Date: dan 2011-12-30 16:09:50.209
Context
2011-12-30
16:16
Fix a typo in the documentation for PCACHE2. No changes to code. (check-in: 46e7903ab9 user: drh tags: trunk)
16:09
Change dbstatus.test to account for the fact that the value reported by DBSTATUS_SCHEMA_USED may be slightly lower than the actual memory used on osx (check-in: 6f2010c862 user: dan tags: trunk)
16:07
Fix up requirements marks for syntax diagrams to reflect the new and improved GIF renderings. (check-in: 1bb23a3b52 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/dbstatus.test.
207
208
209
210
211
212
213
214



215
216


217
218
219
220
221
222
223
    # Additionally, in auto-vacuum mode, dropping tables and indexes causes
    # the page-cache to shrink. So the amount of memory freed is always
    # much greater than just that reported by DBSTATUS_SCHEMA_USED in this
    # case.
    #
    # Some of the memory used for sqlite_stat3 is unaccounted for by
    # dbstatus.
    #



    if {[string match *x $tn] || $AUTOVACUUM
         || ([string match *y $tn] && $STAT3)} {


      do_test dbstatus-2.$tn.ax { expr {($nSchema1-$nSchema2)<=$nFree} } 1
    } else {
      do_test dbstatus-2.$tn.a { expr {$nSchema1-$nSchema2} } $nFree
    }
  
    do_test dbstatus-2.$tn.b { list $nAlloc1 $nSchema1 } "$nAlloc3 $nSchema3"
    do_test dbstatus-2.$tn.c { list $nAlloc2 $nSchema2 } "$nAlloc4 $nSchema4"








>
>
>

|
>
>







207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
    # Additionally, in auto-vacuum mode, dropping tables and indexes causes
    # the page-cache to shrink. So the amount of memory freed is always
    # much greater than just that reported by DBSTATUS_SCHEMA_USED in this
    # case.
    #
    # Some of the memory used for sqlite_stat3 is unaccounted for by
    # dbstatus.
    #
    # Finally, on osx the estimate of memory used by the schema may be
    # slightly low. 
    #
    if {[string match *x $tn] || $AUTOVACUUM
         || ([string match *y $tn] && $STAT3)
         || ($::tcl_platform(os) == "Darwin")
    } {
      do_test dbstatus-2.$tn.ax { expr {($nSchema1-$nSchema2)<=$nFree} } 1
    } else {
      do_test dbstatus-2.$tn.a { expr {$nSchema1-$nSchema2} } $nFree
    }
  
    do_test dbstatus-2.$tn.b { list $nAlloc1 $nSchema1 } "$nAlloc3 $nSchema3"
    do_test dbstatus-2.$tn.c { list $nAlloc2 $nSchema2 } "$nAlloc4 $nSchema4"