/ Check-in [ef0626ab]
Login

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

Overview
Comment:Fix some recently added tests so that they work with SQLITE_DEFAULT_AUTOVACUUM=1.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ef0626ab20f753f01090ca8e8a94e8b516eea55e
User & Date: dan 2014-12-29 12:02:31
Context
2014-12-29
19:54
Fix the --dryrun option in releasetest.tcl. check-in: 0f9e5496 user: drh tags: trunk
12:02
Fix some recently added tests so that they work with SQLITE_DEFAULT_AUTOVACUUM=1. check-in: ef0626ab user: dan tags: trunk
11:50
Reinstate an assert() by adding an "|| CORRUPT_DB" term. check-in: 95ce2034 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/e_walauto.test.

    62     62       }
    63     63     }
    64     64   } {
    65     65   
    66     66     eval $code
    67     67   
    68     68     reset_db
           69  +  execsql { PRAGMA auto_vacuum = 0 }
    69     70     do_execsql_test 1.$tn.0 { PRAGMA journal_mode = WAL } {wal}
    70     71     do_execsql_test 1.$tn.1 { CREATE TABLE t1(a, b) }
    71     72     set shmfd [open "test.db-shm" rb]
    72     73   
    73     74     # EVIDENCE-OF: R-41531-51083 Every new database connection defaults to
    74     75     # having the auto-checkpoint enabled with a threshold of 1000 or
    75     76     # SQLITE_DEFAULT_WAL_AUTOCHECKPOINT pages.

Changes to test/e_walckpt.test.

   243    243     testvfs tvfs
   244    244     tvfs filter xWrite
   245    245     sqlite3 db test.db -vfs tvfs
   246    246     sqlite3 db2 test.db -vfs tvfs
   247    247   
   248    248     do_test $tn.3.2.1 {
   249    249       db2 eval {
          250  +      PRAGMA auto_vacuum = 0;
   250    251         PRAGMA journal_mode = WAL;
   251    252         CREATE TABLE t1(x, y);
   252    253         INSERT INTO t1 VALUES(1,2);
   253    254         INSERT INTO t1 VALUES(3,4);
   254    255         INSERT INTO t1 VALUES(5,6);
   255    256       }
   256    257       file size test.db-wal
................................................................................
   702    703   }
   703    704   
   704    705   reset_db
   705    706   sqlite3 db2 test.db
   706    707   
   707    708   do_test 6.1 {
   708    709     execsql {
          710  +    PRAGMA auto_vacuum = 0; 
   709    711       PRAGMA journal_mode = WAL;
   710    712       CREATE TABLE t1(a, b);
   711    713       INSERT INTO t1 VALUES(1, 2);
   712    714     }
   713    715     file size test.db-wal
   714    716   } [wal_file_size 3 1024]
   715    717   

Changes to test/wal5.test.

   359    359     #
   360    360     do_multiclient_test tn {
   361    361   
   362    362       code1 $do_wal_checkpoint
   363    363       code2 $do_wal_checkpoint
   364    364       code3 $do_wal_checkpoint
   365    365   
   366         -    do_test 3.$tn.1 {
          366  +    do_test 4.$tn.1 {
   367    367         sql1 {
   368    368           PRAGMA page_size = 1024;
          369  +        PRAGMA auto_vacuum = 0;
   369    370           PRAGMA journal_mode = WAL;
   370    371           PRAGMA synchronous = normal;
   371    372           CREATE TABLE t1(x, y);
   372    373           CREATE INDEX i1 ON t1(x, y);
   373    374           INSERT INTO t1 VALUES(1, 2);
   374    375           INSERT INTO t1 VALUES(3, 4);
   375    376         }
   376    377         file size test.db-wal
   377    378       } [wal_file_size 8 1024]
   378    379   
   379         -    do_test 3.$tn.2 { do_wal_checkpoint db -mode truncate } {0 0 0}
   380         -    do_test 3.$tn.3 { file size test.db-wal } 0
          380  +    do_test 4.$tn.2 { do_wal_checkpoint db -mode truncate } {0 0 0}
          381  +    do_test 4.$tn.3 { file size test.db-wal } 0
   381    382   
   382         -    do_test 3.$tn.4 {
          383  +    do_test 4.$tn.4 {
   383    384         sql2 { SELECT * FROM t1 }
   384    385       } {1 2 3 4}
   385    386   
   386         -    do_test 3.$tn.5 {
          387  +    do_test 4.$tn.5 {
   387    388         sql2 { INSERT INTO t1 VALUES('a', 'b') }
   388    389         file size test.db-wal
   389    390       } [wal_file_size 2 1024]
   390    391   
   391    392     }
   392    393   }
   393    394   
   394    395   
   395    396   finish_test