/ Check-in [139bc565]
Login

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

Overview
Comment:Fix additional test cases so that they work with DEFAULT_AUTOVACUUM.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 139bc5655ed1d0fd1b7ca86d05a998fcc5fbc18e
User & Date: dan 2011-04-02 06:44:38
Context
2011-04-02
09:25
Do not attempt to run tests that use the 'wholenumber' virtual table if the build does not support virtual tables. check-in: 20afd81a user: dan tags: trunk
06:44
Fix additional test cases so that they work with DEFAULT_AUTOVACUUM. check-in: 139bc565 user: dan tags: trunk
2011-04-01
23:49
Add the "wholenumber" virtual table module to the test suite - useful in populating tables with many rows of content prior to a test. check-in: 975dff15 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/pagerfault3.test.

22
23
24
25
26
27
28

29
30
31
32
33
34
35

# Create a database with page-size 2048 bytes that uses 2 pages. Populate
# it so that if the page-size is changed to 1024 bytes and the db vacuumed, 
# the new db size is 3 pages.
#
do_test pagerfault3-pre1 {
  execsql {

    PRAGMA page_size = 2048;
    CREATE TABLE t1(x);
    INSERT INTO t1 VALUES(randomblob(1200));
    PRAGMA page_count;
  }
} {2}
do_test pagerfault3-pre2 {







>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

# Create a database with page-size 2048 bytes that uses 2 pages. Populate
# it so that if the page-size is changed to 1024 bytes and the db vacuumed, 
# the new db size is 3 pages.
#
do_test pagerfault3-pre1 {
  execsql {
    PRAGMA auto_vacuum = 0;
    PRAGMA page_size = 2048;
    CREATE TABLE t1(x);
    INSERT INTO t1 VALUES(randomblob(1200));
    PRAGMA page_count;
  }
} {2}
do_test pagerfault3-pre2 {

Changes to test/walfault.test.

129
130
131
132
133
134
135

136
137
138
139
140
141
142
...
519
520
521
522
523
524
525

526
527
528
529
530
531
532
if {[permutation] != "inmemory_journal"} {
  faultsim_delete_and_reopen
  faultsim_save_and_close
  do_faultsim_test walfault-4 -prep {
    faultsim_restore_and_reopen
  } -body {
    execsql {

      PRAGMA journal_mode = WAL;
      CREATE TABLE t1(a PRIMARY KEY, b);
      INSERT INTO t1 VALUES('a', 'b');
      PRAGMA wal_checkpoint;
      SELECT * FROM t1;
    }
  } -test {
................................................................................

#-------------------------------------------------------------------------
# Test fault-handling when wrapping around to the start of a WAL file.
#
do_test walfault-14-pre {
  faultsim_delete_and_reopen
  execsql {

    PRAGMA journal_mode = WAL;
    BEGIN;
      CREATE TABLE abc(a PRIMARY KEY);
      INSERT INTO abc VALUES(randomblob(1500));
      INSERT INTO abc VALUES(randomblob(1500));
    COMMIT;
  }







>







 







>







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
...
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
if {[permutation] != "inmemory_journal"} {
  faultsim_delete_and_reopen
  faultsim_save_and_close
  do_faultsim_test walfault-4 -prep {
    faultsim_restore_and_reopen
  } -body {
    execsql {
      PRAGMA auto_vacuum = 0;
      PRAGMA journal_mode = WAL;
      CREATE TABLE t1(a PRIMARY KEY, b);
      INSERT INTO t1 VALUES('a', 'b');
      PRAGMA wal_checkpoint;
      SELECT * FROM t1;
    }
  } -test {
................................................................................

#-------------------------------------------------------------------------
# Test fault-handling when wrapping around to the start of a WAL file.
#
do_test walfault-14-pre {
  faultsim_delete_and_reopen
  execsql {
    PRAGMA auto_vacuum = 0;
    PRAGMA journal_mode = WAL;
    BEGIN;
      CREATE TABLE abc(a PRIMARY KEY);
      INSERT INTO abc VALUES(randomblob(1500));
      INSERT INTO abc VALUES(randomblob(1500));
    COMMIT;
  }