diff options
author | Hans-Christoph Steiner <hans@eds.org> | 2013-08-13 15:42:54 -0400 |
---|---|---|
committer | Hans-Christoph Steiner <hans@eds.org> | 2013-08-13 15:42:54 -0400 |
commit | 08119c361d1181b3e8f1abb429236e488a664753 (patch) | |
tree | 77e5a8b6d411ca32c360c7e48df5c293b1e0baac /test/incrvacuum_ioerr.test | |
parent | 1b5ba8e022836fa8ab93bc90df1b34a29ea6e134 (diff) |
Imported Upstream version 2.2.1
Diffstat (limited to 'test/incrvacuum_ioerr.test')
-rw-r--r-- | test/incrvacuum_ioerr.test | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/incrvacuum_ioerr.test b/test/incrvacuum_ioerr.test index 946925d..50f7fa2 100644 --- a/test/incrvacuum_ioerr.test +++ b/test/incrvacuum_ioerr.test @@ -139,8 +139,9 @@ ifcapable shared_cache { # Figure out how big the database is and how many free pages it # has before running incremental-vacuum. # - set nPage [expr {[file size test.db]/1024}] set nFree [execsql {pragma freelist_count} db1] + set nPage [execsql {pragma page_count} db1] + puts "nFree=$nFree nPage=$nPage" # Now run incremental-vacuum to vacuum 5 pages from the db file. # The iTest'th I/O call is set to fail. @@ -158,11 +159,11 @@ ifcapable shared_cache { set ::sqlite_io_error_hardhit 0 set nFree2 [execsql {pragma freelist_count} db1] - set nPage2 [expr {[file size test.db]/1024}] + set nPage2 [execsql {pragma page_count} db1] do_test incrvacuum-ioerr-4.$iTest.2 { set shrink [expr {$nPage-$nPage2}] - expr {$shrink==0 || $shrink==5} + expr {$shrink==0 || $shrink==5 || ($nFree<5 && $shrink==$nFree)} } {1} do_test incrvacuum-ioerr-4.$iTest.3 { |