/ Check-in [b58db67e]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Add a coverage test to pagerfault.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b58db67e972b5660e62a9b7daa2c1e87c3cf0a68
User & Date: dan 2010-06-24 13:24:26
Context
2010-06-24
14:52
Disable memory-pressure induced cache spill during savepoint rollback. check-in: a55eb4c3 user: drh tags: trunk
13:24
Add a coverage test to pagerfault.test. check-in: b58db67e user: dan tags: trunk
10:50
Add coverage tests. Remove a NEVER macro from pager.c, as the condition can now be true in wal mode. check-in: 7aac9ad6 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/pagerfault.test.

   374    374     set {} {}
   375    375   } {}
   376    376   do_test pagerfault-8-pre2 {
   377    377     faultsim_restore_and_reopen
   378    378     execsql { DELETE FROM t1 WHERE a>32 }
   379    379     expr {[file size test.db] < $filesize}
   380    380   } {1}
   381         -breakpoint
   382    381   do_faultsim_test pagerfault-8 -prep {
   383    382     faultsim_restore_and_reopen
   384    383     execsql { 
   385    384       BEGIN;
   386    385       DELETE FROM t1 WHERE a>32;
   387    386     }
   388    387   } -body {
   389    388     execsql COMMIT
   390    389   } -test {
   391    390     faultsim_test_result {0 {}}
   392    391     faultsim_integrity_check
   393    392   }
          393  +
          394  +do_test pagerfault-9-pre1 {
          395  +  faultsim_delete_and_reopen
          396  +  execsql {
          397  +    PRAGMA auto_vacuum = incremental;
          398  +    CREATE TABLE t1(x);
          399  +    CREATE TABLE t2(y);
          400  +    CREATE TABLE t3(z);
          401  +
          402  +    INSERT INTO t1 VALUES(randomblob(900));
          403  +    INSERT INTO t1 VALUES(randomblob(900));
          404  +    DELETE FROM t1;
          405  +  }
          406  +  faultsim_save_and_close
          407  +} {}
          408  +
          409  +do_faultsim_test pagerfault-9 -faults oom-transient -prep {
          410  +  faultsim_restore_and_reopen
          411  +  execsql { 
          412  +    BEGIN;
          413  +      INSERT INTO t1 VALUES(randomblob(900));
          414  +      INSERT INTO t1 VALUES(randomblob(900));
          415  +      DROP TABLE t3;
          416  +      DROP TABLE t2;
          417  +      SAVEPOINT abc;
          418  +        PRAGMA incremental_vacuum;
          419  +  }
          420  +} -body {
          421  +  execsql {
          422  +    ROLLBACK TO abc;
          423  +    COMMIT;
          424  +    PRAGMA freelist_count
          425  +  }
          426  +} -test {
          427  +  faultsim_test_result {0 2}
          428  +  faultsim_integrity_check
          429  +
          430  +  set sl [db one { SELECT COALESCE(sum(length(x)), 'null') FROM t1 }]
          431  +  if {$sl!="null" && $sl!=1800} { 
          432  +    error "Content looks no good... ($sl)" 
          433  +  }
          434  +}
   394    435   
   395    436   finish_test