diff options
author | Hans-Christoph Steiner <hans@eds.org> | 2014-10-16 22:51:43 -0400 |
---|---|---|
committer | Hans-Christoph Steiner <hans@eds.org> | 2014-10-16 22:51:43 -0400 |
commit | 9f67c0520ea0d5f11a190197cdf746c512db4ce4 (patch) | |
tree | c88a33f01f20a3d13a09594f114fffacebd0d1a4 /test/dbstatus.test | |
parent | ee20336e9c78d2e3782c8d096b9ab4f6ca8ce95f (diff) | |
parent | 569c6676a6ddb0ff73821d7693b5e18ddef809b9 (diff) |
Merge tag 'upstream/3.2.0'
Upstream version 3.2.0
# gpg: Signature made Thu 16 Oct 2014 10:51:39 PM EDT using RSA key ID 374BBE81
# gpg: Good signature from "Hans-Christoph Steiner <hans@guardianproject.info>"
# gpg: aka "Hans-Christoph Steiner <hans@eds.org>"
# gpg: aka "Hans-Christoph Steiner <hans@at.or.at>"
# gpg: aka "[jpeg image of size 5408]"
Diffstat (limited to 'test/dbstatus.test')
-rw-r--r-- | test/dbstatus.test | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/dbstatus.test b/test/dbstatus.test index 9793df3..368c6b2 100644 --- a/test/dbstatus.test +++ b/test/dbstatus.test @@ -61,7 +61,7 @@ proc lookaside {db} { } } -ifcapable stat3 { +ifcapable stat4||stat3 { set STAT3 1 } else { set STAT3 0 @@ -134,7 +134,7 @@ foreach ::lookaside_buffer_size {0 64 120} { CREATE TABLE t2(c, d); CREATE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2; } - 6y { + 6k { CREATE TABLE t1(a, b); CREATE INDEX i1 ON t1(a); CREATE INDEX i2 ON t1(a,b); @@ -204,6 +204,11 @@ foreach ::lookaside_buffer_size {0 64 120} { set nSchema4 [lindex [sqlite3_db_status db SQLITE_DBSTATUS_SCHEMA_USED 0] 1] set nFree [expr {$nAlloc1-$nAlloc2}] + # Tests for which the test name ends in an "k" report slightly less + # memory than is actually freed when all schema items are finalized. + # This is because memory allocated by KeyInfo objects is no longer + # counted as "schema memory". + # # Tests for which the test name ends in an "x" report slightly less # memory than is actually freed when all schema items are finalized. # This is because memory allocated by virtual table implementations @@ -214,13 +219,14 @@ foreach ::lookaside_buffer_size {0 64 120} { # 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 + # Some of the memory used for sqlite_stat4 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 + if {[string match *k $tn] + || [string match *x $tn] || $AUTOVACUUM || ([string match *y $tn] && $STAT3) || ($::tcl_platform(os) == "Darwin") } { @@ -246,7 +252,7 @@ foreach ::lookaside_buffer_size {0 64 120} { # lookaside memory allocated by SQLite, and the memory allocated # for the prepared statements according to sqlite3_db_status(). # - # 3. Finalize all prepared statements Measure the total memory + # 3. Finalize all prepared statements. Measure the total memory # and the prepared statement memory again. # # 4. Repeat step 2. |