/ Check-in [2a5eed35]
Login

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

Overview
Comment:Add test case to verify the previous change is correct.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2a5eed35b410fb6bd69242841c00700906f48d5f
User & Date: dan 2010-09-02 14:35:36
Context
2010-09-02
17:15
Use sqlite3_mutex_notheld() instead of !sqlite3_mutex_held() inside of assert() statements since the former works when mutexing is disabled while the latter does not. check-in: 2211486b user: drh tags: trunk
14:35
Add test case to verify the previous change is correct. check-in: 2a5eed35 user: dan tags: trunk
14:00
Fix the computation of the offset on the mmap() for the Nth shared memory region. Because of the way shared memory is accessed, the old computation, though wrong, still happened to always get the right answer. Nevertheless, it is good to do the computation correctly. check-in: 36397f62 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/wal3.test.

   740    740   do_test wal3-9.4 {
   741    741     db49 close
   742    742     execsql { PRAGMA wal_checkpoint } 
   743    743     set sz2 [file size test.db]
   744    744     byte_is_zero test.db [expr $sz-1024]
   745    745   } {0}
   746    746   
   747         -db close
          747  +do_multiclient_test tn {
          748  +  do_test wal3-10.$tn.1 {
          749  +    sql1 {
          750  +      PRAGMA page_size = 1024;
          751  +      CREATE TABLE t1(x);
          752  +      PRAGMA journal_mode = WAL;
          753  +      PRAGMA wal_autocheckpoint = 100000;
          754  +      BEGIN;
          755  +        INSERT INTO t1 VALUES(randomblob(800));
          756  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 2
          757  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 4
          758  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 8
          759  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 16
          760  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 32
          761  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 64
          762  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 128
          763  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 256
          764  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 512
          765  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 1024
          766  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 2048
          767  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 4096
          768  +        INSERT INTO t1 SELECT randomblob(800) FROM t1;   -- 8192
          769  +      COMMIT;
          770  +      CREATE INDEX i1 ON t1(x);
          771  +    }
          772  +
          773  +    expr {[file size test.db-wal] > [expr 1032*9000]}
          774  +  } 1
          775  +
          776  +  do_test wal3-10.$tn.2 {
          777  +    sql2 {PRAGMA integrity_check}
          778  +  } {ok}
          779  +}
   748    780   
   749    781   finish_test
   750    782