diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
---|---|---|
committer | <> | 2015-03-17 16:26:24 +0000 |
commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /test/tcl/test130.tcl | |
parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
download | berkeleydb-780b92ada9afcf1d58085a83a0b9e6bc982203d1.tar.gz |
Diffstat (limited to 'test/tcl/test130.tcl')
-rw-r--r-- | test/tcl/test130.tcl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/tcl/test130.tcl b/test/tcl/test130.tcl index 08985140..8a8e0cc2 100644 --- a/test/tcl/test130.tcl +++ b/test/tcl/test130.tcl @@ -1,6 +1,6 @@ # See the file LICENSE for redistribution information. # -# Copyright (c) 2010, 2012 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved. # # $Id$ # @@ -227,6 +227,7 @@ proc test130 { method {nentries 10000} {num_db 3} {tnum "130"} args } { } # Now compact for real. + set orig_size [file size $filename] if {[catch {eval {$db(0,$i) compact} \ $txn {-freespace}} ret] } { error "FAIL: db compact: $ret" @@ -243,6 +244,20 @@ proc test130 { method {nentries 10000} {num_db 3} {tnum "130"} args } { error_check_good db_sync [$db(0,$i) sync] 0 error_check_good verify_dir \ [verify_dir $testdir "" 0 0 $nodump ] 0 + # + # The compaction of subdb$i with i < (numdb - 1) is not + # expected to reduce the file size because the last + # page of the file is owned by subdb${num_db-1}. + # + set after_compact_size [file size $filename] + if { $i < [expr $num_db - 1] || + ($txnenv == 1 && $commit == 0) } { + error_check_good file_size \ + [expr $orig_size == $after_compact_size] 1 + } else { + error_check_good file_size \ + [expr $orig_size >= $after_compact_size] 1 + } } } |