mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix issue with several memory allocation tests due to KeyInfo allocations now being shared.
FossilOrigin-Name: 569fedd6bb07bdd3430da8dc65de4a9fdfe204cc
This commit is contained in:
@ -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
|
||||
@ -220,7 +225,8 @@ foreach ::lookaside_buffer_size {0 64 120} {
|
||||
# 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.
|
||||
|
Reference in New Issue
Block a user