/ Check-in [0d05f3fb]
Login

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

Overview
Comment:Get io.test to work even if auto_vacuum is on by default and we are running with a reduced maximum page size. (CVS 4463)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0d05f3fbaad44a0d3723cd543b865326acddf883
User & Date: drh 2007-10-03 21:18:20
Context
2007-10-04
00:29
Updates to the documentation index page. (CVS 4464) check-in: 837fc861 user: drh tags: trunk
2007-10-03
21:18
Get io.test to work even if auto_vacuum is on by default and we are running with a reduced maximum page size. (CVS 4463) check-in: 0d05f3fb user: drh tags: trunk
21:10
Fix a syntax error that comes up when memory debugging is disabled. (CVS 4462) check-in: 96dd3c33 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/io.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # The focus of this file is testing some specific characteristics of the 
    13     13   # IO traffic generated by SQLite (making sure SQLite is not writing out
    14     14   # more database pages than it has to, stuff like that).
    15     15   #
    16         -# $Id: io.test,v 1.10 2007/09/12 17:01:45 danielk1977 Exp $
           16  +# $Id: io.test,v 1.11 2007/10/03 21:18:20 drh Exp $
    17     17   
    18     18   set testdir [file dirname $argv0]
    19     19   source $testdir/tester.tcl
    20     20   
    21     21   # Test summary:
    22     22   #
    23     23   # io-1.* -  Test that quick-balance does not journal pages unnecessarily.
................................................................................
    53     53     set res [expr {$::sqlite_sync_count - $::nSync}]
    54     54     set ::nSync $::sqlite_sync_count
    55     55     set res
    56     56   }
    57     57   
    58     58   do_test io-1.1 {
    59     59     execsql {
           60  +    PRAGMA auto_vacuum = OFF;
    60     61       PRAGMA page_size = 1024;
    61     62       CREATE TABLE abc(a,b);
    62     63     }
    63     64     nWrite db
    64     65   } {2}
    65     66   
    66     67   # Insert into the table 4 records of aproximately 240 bytes each.
................................................................................
   291    292   } {1}
   292    293   do_test io-2.9.2 {
   293    294     execsql { ROLLBACK; }
   294    295     db close
   295    296     file delete -force test.db test.db-journal
   296    297     sqlite3 db test.db
   297    298     execsql {
          299  +    PRAGMA auto_vacuum = OFF;
   298    300       PRAGMA page_size = 2048;
   299    301       CREATE TABLE abc(a, b);
   300    302     }
   301    303     execsql {
   302    304       BEGIN;
   303    305       INSERT INTO abc VALUES(9, 10);
   304    306     }
................................................................................
   362    364   #
   363    365   sqlite3_simulate_device -char sequential -sectorsize 0
   364    366   ifcapable pager_pragmas {
   365    367     do_test io-3.1 {
   366    368       db close
   367    369       file delete -force test.db test.db-journal
   368    370       sqlite3 db test.db
          371  +    db eval {
          372  +      PRAGMA auto_vacuum=OFF;
          373  +    }
   369    374       file size test.db
   370    375     } {0}
   371    376     do_test io-3.2 {
   372    377       execsql { CREATE TABLE abc(a, b) }
   373    378       nSync
   374    379       execsql {
   375    380         PRAGMA cache_size = 10;
................................................................................
   517    522            {atomic512}            512      1024
   518    523            {atomic2K}             512      2048
   519    524            {atomic2K}            4096      4096
   520    525            {atomic2K atomic}      512      8192
   521    526            {atomic64K}            512      1024
   522    527   } {
   523    528     incr tn
          529  +  if {$pgsize>$::SQLITE_MAX_PAGE_SIZE} continue
   524    530     db close
   525    531     file delete -force test.db test.db-journal
   526    532     sqlite3_simulate_device -char $char -sectorsize $sectorsize
   527    533     sqlite3 db test.db
          534  +  db eval {
          535  +    PRAGMA auto_vacuum=OFF;
          536  +  }
   528    537     ifcapable !atomicwrite {
   529    538       if {[regexp {^atomic} $char]} continue
   530    539     }
   531    540     do_test io-5.$tn {
   532    541       execsql {
   533    542         CREATE TABLE abc(a, b, c);
   534    543       }
   535    544       expr {[file size test.db]/2}
   536    545     } $pgsize
   537    546   }
   538    547   
   539    548   sqlite3_simulate_device -char {} -sectorsize 0
   540    549   finish_test