/ Check-in [49d21ce5]
Login

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

Overview
Comment:Add code for a test that was failing before the persistent-wal related changes of [09ccc4a1be].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 49d21ce50fcf535e470d284ccbb9eb4d4bcfa3a6
User & Date: dan 2011-12-16 17:01:04
Original Comment: Add code for a test that was failing before the persistent-wal related changes of [9ccc4a1be].
Context
2011-12-17
01:31
Make sure the Salt-1 value in the WAL file is sequentially numbered at each checkpoint, as it says it should be in the documentation. check-in: 7b63b11b user: drh tags: trunk
2011-12-16
17:01
Add code for a test that was failing before the persistent-wal related changes of [09ccc4a1be]. check-in: 49d21ce5 user: dan tags: trunk
15:38
Merge the fix for [a1fa75cbdd02] from the experimental branch. Also fix the persistent-wal mode feature of truncating the WAL on close so that it always truncates the WAL to zero bytes. check-in: 09ccc4a1 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/walpersist.test.

    86     86     expr {[file size test.db-wal]>100000}
    87     87   } {1}
    88     88   do_test walpersist-2.2 {
    89     89     file_control_persist_wal db 1
    90     90     db close
    91     91     concat [file exists test.db-wal] [file size test.db-wal]
    92     92   } {1 0}
           93  +do_test walpersist-2.3 {
           94  +  sqlite3 db test.db
           95  +  execsql { PRAGMA integrity_check }
           96  +} {ok}
           97  +
           98  +do_test 3.1 {
           99  +  catch {db close}
          100  +  forcedelete test.db test.db-shm test.db-wal
          101  +  sqlite3 db test.db
          102  +  execsql {
          103  +    PRAGMA page_size = 1024;
          104  +    PRAGMA journal_mode = WAL;
          105  +    PRAGMA wal_autocheckpoint=128;
          106  +    PRAGMA journal_size_limit=16384;
          107  +    CREATE TABLE t1(a, b, PRIMARY KEY(a, b));
          108  +  }
          109  +} {wal 128 16384}
          110  +do_test 3.2 {
          111  +  for {set i 0} {$i<200} {incr i} {
          112  +    execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) }
          113  +  }
          114  +  file_control_persist_wal db 1
          115  +  db close
          116  +} {}
          117  +do_test walpersist-3.3 { 
          118  +  file size test.db-wal 
          119  +} {0}
          120  +do_test walpersist-3.4 { 
          121  +  sqlite3 db test.db
          122  +  execsql { PRAGMA integrity_check }
          123  +} {ok}
          124  + 
    93    125   
    94    126   finish_test