/ Check-in [99b9d7ee]
Login

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

Overview
Comment:Many more test cases fixed. Only a few remain.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | see-testing
Files: files | file ages | folders
SHA1:99b9d7eef68fd6d5c9eecb5fbe3dfe002c1ca4a8
User & Date: drh 2016-03-14 18:34:42
Context
2016-03-14
18:42
Merge test script fixes from trunk. check-in: ea1d2cdd user: drh tags: see-testing
18:34
Many more test cases fixed. Only a few remain. check-in: 99b9d7ee user: drh tags: see-testing
17:05
Many test cases fixed to work with encryption. check-in: d866fffb user: drh tags: see-testing
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/e_walauto.test.

    19     19   # accessing the same coherent view of the "test.db-shm" file. This doesn't
    20     20   # work on OpenBSD.
    21     21   #
    22     22   if {$tcl_platform(os) == "OpenBSD"} {
    23     23     finish_test
    24     24     return
    25     25   }
           26  +
           27  +# This module uses hard-coded offsets which do not work if the reserved_bytes
           28  +# value is nonzero.
           29  +if {[nonzero_reserved_bytes]} {finish_test; return;}
           30  +
    26     31   
    27     32   proc read_nbackfill {} {
    28     33     seek $::shmfd 96
    29     34     binary scan [read $::shmfd 4] n nBackfill
    30     35     set nBackfill
    31     36   }
    32     37   proc read_mxframe {} {

Changes to test/incrblob.test.

   122    122     db close
   123    123     forcedelete test.db test.db-journal
   124    124   
   125    125     sqlite3 db test.db
   126    126     execsql "PRAGMA mmap_size = 0"
   127    127     execsql "PRAGMA auto_vacuum = $AutoVacuumMode"
   128    128   
          129  +  # Extra value added to size answers
          130  +  set ib2_extra 0
          131  +  if {$AutoVacuumMode} {incr ib2_extra}
          132  +  if {[nonzero_reserved_bytes]} {incr ib2_extra}
          133  +
   129    134     do_test incrblob-2.$AutoVacuumMode.1 {
   130    135       set ::str [string repeat abcdefghij 2900]
   131    136       execsql {
   132    137         BEGIN;
   133    138         CREATE TABLE blobs(k PRIMARY KEY, v BLOB, i INTEGER);
   134    139         DELETE FROM blobs;
   135    140         INSERT INTO blobs VALUES('one', $::str || randstr(500,500), 45);
   136    141         COMMIT;
   137    142       }
   138    143       expr [file size test.db]/1024
   139         -  } [expr 31 + $AutoVacuumMode]
          144  +  } [expr 31 + $ib2_extra]
   140    145   
   141    146     ifcapable autovacuum {
   142    147       do_test incrblob-2.$AutoVacuumMode.2 {
   143    148         execsql {
   144    149           PRAGMA auto_vacuum;
   145    150         }
   146    151       } $AutoVacuumMode
................................................................................
   159    164       close $::blob
   160    165     
   161    166       # If the database is not in auto-vacuum mode, the whole of
   162    167       # the overflow-chain must be scanned. In auto-vacuum mode,
   163    168       # sqlite uses the ptrmap pages to avoid reading the other pages.
   164    169       #
   165    170       nRead db
   166         -  } [expr $AutoVacuumMode ? 4 : 30]
          171  +  } [expr $AutoVacuumMode ? 4 : 30+$ib2_extra]
   167    172   
   168    173     do_test incrblob-2.$AutoVacuumMode.4 {
   169    174       string range [db one {SELECT v FROM blobs}] end-19 end
   170    175     } $::fragment
   171    176   
   172    177     do_test incrblob-2.$AutoVacuumMode.5 {
   173    178       # Open and close the db to make sure the page cache is empty.
................................................................................
   183    188       flush $::blob
   184    189     
   185    190       # If the database is not in auto-vacuum mode, the whole of
   186    191       # the overflow-chain must be scanned. In auto-vacuum mode,
   187    192       # sqlite uses the ptrmap pages to avoid reading the other pages.
   188    193       #
   189    194       nRead db
   190         -  } [expr $AutoVacuumMode ? 4 : 30]
          195  +  } [expr $AutoVacuumMode ? 4 : 30 + $ib2_extra]
   191    196   
   192    197     # Pages 1 (the write-counter) and 32 (the blob data) were written.
   193    198     do_test incrblob-2.$AutoVacuumMode.6 {
   194    199       close $::blob
   195    200       nWrite db
   196    201     } 2
   197    202   
................................................................................
   206    211       execsql { PRAGMA mmap_size = 0 }
   207    212   
   208    213       execsql { SELECT i FROM blobs } 
   209    214     } {45}
   210    215   
   211    216     do_test incrblob-2.$AutoVacuumMode.9 {
   212    217       nRead db
   213         -  } [expr $AutoVacuumMode ? 4 : 30]
          218  +  } [expr $AutoVacuumMode ? 4 : 30 + $ib2_extra]
   214    219   }
   215    220   sqlite3_soft_heap_limit $cmdlinearg(soft-heap-limit)
   216    221   
   217    222   #------------------------------------------------------------------------
   218    223   # incrblob-3.*: 
   219    224   #
   220    225   # Test the outcome of trying to write to a read-only blob handle.

Changes to test/io.test.

   420    420       # that the file is now greater than 20000 bytes in size.
   421    421       list [expr [file size test.db]>20000] [nSync]
   422    422     } {1 0}
   423    423     do_test io-3.3 {
   424    424       # The COMMIT requires a single fsync() - to the database file.
   425    425       execsql { COMMIT }
   426    426       list [file size test.db] [nSync]
   427         -  } {39936 1}
          427  +  } "[expr {[nonzero_reserved_bytes]?40960:39936}] 1"
   428    428   }
   429    429   
   430    430   #----------------------------------------------------------------------
   431    431   # Test cases io-4.* test the IOCAP_SAFE_APPEND optimization.
   432    432   #
   433    433   sqlite3_simulate_device -char safe_append
   434    434   

Changes to test/memsubsys1.test.

   251    251     expr {$pg_used<24}
   252    252   } 1
   253    253   do_test memsubsys1-7.4 {
   254    254     set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
   255    255   } 0
   256    256   do_test memsubsys1-7.5 {
   257    257     set maxreq [lindex [sqlite3_status SQLITE_STATUS_MALLOC_SIZE 0] 2]
   258         -  expr {$maxreq<4100}
          258  +  expr {$maxreq<4100 + 4200*[nonzero_reserved_bytes]}
   259    259   } 1
   260    260   do_test memsubsys1-7.6 {
   261    261     set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2]
   262    262   } 1
   263    263   do_test memsubsys1-7.7 {
   264    264     set s_ovfl [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_OVERFLOW 0] 2]
   265    265   } 0

Changes to test/mmap1.test.

    84     84         sql1 "SELECT count(*) FROM t1; PRAGMA integrity_check ; PRAGMA page_count"
    85     85       } {32 ok 77}
    86     86   
    87     87       # Have connection 2 shrink the file. Check connection 1 can still read it.
    88     88       sql2 { DELETE FROM t1 WHERE rowid%2; }
    89     89       do_test $t.$tn.2 {
    90     90         sql1 "SELECT count(*) FROM t1; PRAGMA integrity_check ; PRAGMA page_count"
    91         -    } {16 ok 42}
           91  +    } "16 ok [expr {42+[nonzero_reserved_bytes]}]"
    92     92   
    93     93       # Have connection 2 grow the file. Check connection 1 can still read it.
    94     94       sql2 { INSERT INTO t1 SELECT rblob(500), rblob(500) FROM t1 }
    95     95       do_test $t.$tn.3 {
    96     96         sql1 "SELECT count(*) FROM t1; PRAGMA integrity_check ; PRAGMA page_count"
    97     97       } {32 ok 79}
    98     98   
................................................................................
   100    100       sql2 { INSERT INTO t1 SELECT rblob(500), rblob(500) FROM t1 }
   101    101       do_test $t.$tn.4 {
   102    102         sql1 "SELECT count(*) FROM t1; PRAGMA integrity_check ; PRAGMA page_count"
   103    103       } {64 ok 149}
   104    104   
   105    105       # Check that the number of pages read by connection 1 indicates that the
   106    106       # "PRAGMA mmap_size" command worked.
   107         -    do_test $t.$tn.5 { nRead db } $nRead
          107  +    if {[nonzero_reserved_bytes]==0} {
          108  +      do_test $t.$tn.5 { nRead db } $nRead
          109  +    }
   108    110     }
   109    111   }
   110    112   
   111    113   set ::rcnt 0
   112    114   proc rblob {n} {
   113    115     set ::rcnt [expr (($::rcnt << 3) + $::rcnt + 456) & 0xFFFFFFFF]
   114    116     set str [format %.8x [expr $::rcnt ^ 0xbdf20da3]]

Changes to test/mmap3.test.

    15     15   ifcapable !mmap||!vtab {
    16     16     finish_test
    17     17     return
    18     18   }
    19     19   source $testdir/lock_common.tcl
    20     20   set testprefix mmap3
    21     21   
           22  +# A codec shuts down memory-mapped I/O
           23  +if {[nonzero_reserved_bytes]} {finish_test; return;}
           24  +
    22     25   do_test mmap3-1.0 {
    23     26     load_static_extension db wholenumber
    24     27     db eval {
    25     28       PRAGMA mmap_size=100000;
    26     29       CREATE TABLE t1(x, y);
    27     30       CREATE VIRTUAL TABLE nums USING wholenumber;
    28     31       INSERT INTO t1 SELECT value, randomblob(value) FROM nums

Changes to test/nan.test.

   147    147   # SQLite always converts NaN into NULL so it is not possible to write
   148    148   # a NaN value into the database file using SQLite.  The following series
   149    149   # of tests writes a normal floating point value (0.5) into the database,
   150    150   # then writes directly into the database file to change the 0.5 into NaN.
   151    151   # Then it reads the value of the database to verify it is converted into
   152    152   # NULL.
   153    153   #
   154         -do_test nan-3.1 {
   155         -  db eval {
   156         -    DELETE FROM t1;
   157         -    INSERT INTO t1 VALUES(0.5);
   158         -    PRAGMA auto_vacuum=OFF;
   159         -    PRAGMA page_size=1024;
   160         -    VACUUM;
   161         -  }
   162         -  hexio_read test.db 2040 8
   163         -} {3FE0000000000000}
   164         -do_test nan-3.2 {
   165         -  db eval {
   166         -    SELECT x, typeof(x) FROM t1
   167         -  }
   168         -} {0.5 real}
   169         -do_test nan-3.3 {
   170         -  db close
   171         -  hexio_write test.db 2040 FFF8000000000000
   172         -  sqlite3 db test.db
   173         -  db eval {SELECT x, typeof(x) FROM t1}
   174         -} {{} null}
   175         -do_test nan-3.4 {
   176         -  db close
   177         -  hexio_write test.db 2040 7FF8000000000000
   178         -  sqlite3 db test.db
   179         -  db eval {SELECT x, typeof(x) FROM t1}
   180         -} {{} null}
   181         -do_test nan-3.5 {
   182         -  db close
   183         -  hexio_write test.db 2040 FFFFFFFFFFFFFFFF
   184         -  sqlite3 db test.db
   185         -  db eval {SELECT x, typeof(x) FROM t1}
   186         -} {{} null}
   187         -do_test nan-3.6 {
   188         -  db close
   189         -  hexio_write test.db 2040 7FFFFFFFFFFFFFFF
   190         -  sqlite3 db test.db
   191         -  db eval {SELECT x, typeof(x) FROM t1}
   192         -} {{} null}
          154  +if {![nonzero_reserved_bytes]} {
          155  +  do_test nan-3.1 {
          156  +    db eval {
          157  +      DELETE FROM t1;
          158  +      INSERT INTO t1 VALUES(0.5);
          159  +      PRAGMA auto_vacuum=OFF;
          160  +      PRAGMA page_size=1024;
          161  +      VACUUM;
          162  +    }
          163  +    hexio_read test.db 2040 8
          164  +  } {3FE0000000000000}
          165  +  do_test nan-3.2 {
          166  +    db eval {
          167  +      SELECT x, typeof(x) FROM t1
          168  +    }
          169  +  } {0.5 real}
          170  +  do_test nan-3.3 {
          171  +    db close
          172  +    hexio_write test.db 2040 FFF8000000000000
          173  +    sqlite3 db test.db
          174  +    db eval {SELECT x, typeof(x) FROM t1}
          175  +  } {{} null}
          176  +  do_test nan-3.4 {
          177  +    db close
          178  +    hexio_write test.db 2040 7FF8000000000000
          179  +    sqlite3 db test.db
          180  +    db eval {SELECT x, typeof(x) FROM t1}
          181  +  } {{} null}
          182  +  do_test nan-3.5 {
          183  +    db close
          184  +    hexio_write test.db 2040 FFFFFFFFFFFFFFFF
          185  +    sqlite3 db test.db
          186  +    db eval {SELECT x, typeof(x) FROM t1}
          187  +  } {{} null}
          188  +  do_test nan-3.6 {
          189  +    db close
          190  +    hexio_write test.db 2040 7FFFFFFFFFFFFFFF
          191  +    sqlite3 db test.db
          192  +    db eval {SELECT x, typeof(x) FROM t1}
          193  +  } {{} null}
          194  +}
   193    195   
   194    196   # Verify that the sqlite3AtoF routine is able to handle extreme
   195    197   # numbers.
   196    198   #
   197    199   do_test nan-4.1 {
   198    200     db eval {DELETE FROM t1}
   199    201     db eval "INSERT INTO t1 VALUES([string repeat 9 307].0)"

Changes to test/pageropt.test.

    12     12   # The focus of the tests in this file are to verify that the
    13     13   # pager optimizations implemented in version 3.3.14 work.
    14     14   #
    15     15   # $Id: pageropt.test,v 1.5 2008/08/20 14:49:25 danielk1977 Exp $
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
           19  +do_not_use_codec
    19     20   
    20     21   ifcapable {!pager_pragmas||secure_delete||direct_read} {
    21     22     finish_test
    22     23     return
    23     24   }
    24     25   
    25     26   # Run the SQL statement supplied by the argument and return

Changes to test/pragma.test.

  1737   1737     catchsql {PRAGMA data_store_directory}
  1738   1738   } {0 {}}
  1739   1739   
  1740   1740   forcedelete data_dir
  1741   1741   } ;# endif windows
  1742   1742   
  1743   1743   database_may_be_corrupt
         1744  +if {![nonzero_reserved_bytes]} {
  1744   1745   
  1745         -do_test 21.1 {
  1746         -  # Create a corrupt database in testerr.db. And a non-corrupt at test.db.
  1747         -  #
  1748         -  db close
  1749         -  forcedelete test.db
  1750         -  sqlite3 db test.db
  1751         -  execsql { 
  1752         -    PRAGMA page_size = 1024;
  1753         -    PRAGMA auto_vacuum = 0;
  1754         -    CREATE TABLE t1(a PRIMARY KEY, b);
  1755         -    INSERT INTO t1 VALUES(1, 1);
  1756         -  }
  1757         -  for {set i 0} {$i < 10} {incr i} {
  1758         -    execsql { INSERT INTO t1 SELECT a + (1 << $i), b + (1 << $i) FROM t1 }
  1759         -  }
  1760         -  db close
  1761         -  forcecopy test.db testerr.db
  1762         -  hexio_write testerr.db 15000 [string repeat 55 100]
  1763         -} {100}
  1764         -
  1765         -set mainerr {*** in database main ***
         1746  +  do_test 21.1 {
         1747  +    # Create a corrupt database in testerr.db. And a non-corrupt at test.db.
         1748  +    #
         1749  +    db close
         1750  +    forcedelete test.db
         1751  +    sqlite3 db test.db
         1752  +    execsql { 
         1753  +      PRAGMA page_size = 1024;
         1754  +      PRAGMA auto_vacuum = 0;
         1755  +      CREATE TABLE t1(a PRIMARY KEY, b);
         1756  +      INSERT INTO t1 VALUES(1, 1);
         1757  +    }
         1758  +    for {set i 0} {$i < 10} {incr i} {
         1759  +      execsql { INSERT INTO t1 SELECT a + (1 << $i), b + (1 << $i) FROM t1 }
         1760  +    }
         1761  +    db close
         1762  +    forcecopy test.db testerr.db
         1763  +    hexio_write testerr.db 15000 [string repeat 55 100]
         1764  +  } {100}
         1765  +  
         1766  +  set mainerr {*** in database main ***
         1767  +Multiple uses for byte 672 of page 15}
         1768  +  set auxerr {*** in database aux ***
  1766   1769   Multiple uses for byte 672 of page 15}
  1767         -set auxerr {*** in database aux ***
  1768         -Multiple uses for byte 672 of page 15}
  1769         -
  1770         -set mainerr {/{\*\*\* in database main \*\*\*
         1770  +  
         1771  +  set mainerr {/{\*\*\* in database main \*\*\*
  1771   1772   Multiple uses for byte 672 of page 15}.*/}
  1772         -set auxerr {/{\*\*\* in database aux \*\*\*
         1773  +  set auxerr {/{\*\*\* in database aux \*\*\*
  1773   1774   Multiple uses for byte 672 of page 15}.*/}
  1774         -
  1775         -do_test 22.2 {
  1776         -  catch { db close }
  1777         -  sqlite3 db testerr.db
  1778         -  execsql { PRAGMA integrity_check }
  1779         -} $mainerr
  1780         -
  1781         -do_test 22.3.1 {
  1782         -  catch { db close }
  1783         -  sqlite3 db test.db
  1784         -  execsql { 
  1785         -    ATTACH 'testerr.db' AS 'aux';
  1786         -    PRAGMA integrity_check;
  1787         -  }
  1788         -} $auxerr
  1789         -do_test 22.3.2 {
  1790         -  execsql { PRAGMA main.integrity_check; }
  1791         -} {ok}
  1792         -do_test 22.3.3 {
  1793         -  execsql { PRAGMA aux.integrity_check; }
  1794         -} $auxerr
  1795         -
  1796         -do_test 22.4.1 {
  1797         -  catch { db close }
  1798         -  sqlite3 db testerr.db
  1799         -  execsql { 
  1800         -    ATTACH 'test.db' AS 'aux';
  1801         -    PRAGMA integrity_check;
  1802         -  }
  1803         -} $mainerr
  1804         -do_test 22.4.2 {
  1805         -  execsql { PRAGMA main.integrity_check; }
  1806         -} $mainerr
  1807         -do_test 22.4.3 {
  1808         -  execsql { PRAGMA aux.integrity_check; }
  1809         -} {ok}
  1810         -
         1775  +  
         1776  +  do_test 22.2 {
         1777  +    catch { db close }
         1778  +    sqlite3 db testerr.db
         1779  +    execsql { PRAGMA integrity_check }
         1780  +  } $mainerr
         1781  +  
         1782  +  do_test 22.3.1 {
         1783  +    catch { db close }
         1784  +    sqlite3 db test.db
         1785  +    execsql { 
         1786  +      ATTACH 'testerr.db' AS 'aux';
         1787  +      PRAGMA integrity_check;
         1788  +    }
         1789  +  } $auxerr
         1790  +  do_test 22.3.2 {
         1791  +    execsql { PRAGMA main.integrity_check; }
         1792  +  } {ok}
         1793  +  do_test 22.3.3 {
         1794  +    execsql { PRAGMA aux.integrity_check; }
         1795  +  } $auxerr
         1796  +  
         1797  +  do_test 22.4.1 {
         1798  +    catch { db close }
         1799  +    sqlite3 db testerr.db
         1800  +    execsql { 
         1801  +      ATTACH 'test.db' AS 'aux';
         1802  +      PRAGMA integrity_check;
         1803  +    }
         1804  +  } $mainerr
         1805  +  do_test 22.4.2 {
         1806  +    execsql { PRAGMA main.integrity_check; }
         1807  +  } $mainerr
         1808  +  do_test 22.4.3 {
         1809  +    execsql { PRAGMA aux.integrity_check; }
         1810  +  } {ok}
         1811  +}
         1812  +  
  1811   1813   db close
  1812   1814   forcedelete test.db test.db-wal test.db-journal
  1813   1815   sqlite3 db test.db
  1814   1816   sqlite3 db2 test.db
  1815   1817   do_test 23.1 {
  1816   1818     db eval {
  1817   1819       CREATE TABLE t1(a INTEGER PRIMARY KEY,b,c,d);

Changes to test/pragma3.test.

    11     11   # This file implements regression tests for SQLite library.
    12     12   #
    13     13   # This file implements tests for PRAGMA data_version command.
    14     14   #
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
           18  +do_not_use_codec
    18     19   
    19     20   do_execsql_test pragma3-100 {
    20     21     PRAGMA data_version;
    21     22   } {1}
    22     23   do_execsql_test pragma3-101 {
    23     24     PRAGMA temp.data_version;
    24     25   } {1}

Changes to test/stat.test.

    17     17   set testprefix stat
    18     18   
    19     19   ifcapable !vtab||!compound {
    20     20     finish_test
    21     21     return
    22     22   }
    23     23   
           24  +# This module uses hard-coded results that depend on exact measurements of
           25  +# pages sizes at the byte level, and hence will not work if the reserved_bytes
           26  +# value is nonzero.
           27  +if {[nonzero_reserved_bytes]} {finish_test; return;}
    24     28   
    25     29   set ::asc 1
    26     30   proc a_string {n} { string range [string repeat [incr ::asc]. $n] 1 $n }
    27     31   db func a_string a_string
    28     32   
    29     33   register_dbstat_vtab db
    30     34   do_execsql_test stat-0.0 {

Changes to test/tclsqlite.test.

    18     18   # $Id: tclsqlite.test,v 1.73 2009/03/16 13:19:36 danielk1977 Exp $
    19     19   
    20     20   set testdir [file dirname $argv0]
    21     21   source $testdir/tester.tcl
    22     22   
    23     23   # Check the error messages generated by tclsqlite
    24     24   #
           25  +set r "sqlite_orig HANDLE FILENAME ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?"
    25     26   if {[sqlite3 -has-codec]} {
    26         -  set r "sqlite_orig HANDLE FILENAME ?-key CODEC-KEY?"
    27         -} else {
    28         -  set r "sqlite_orig HANDLE FILENAME ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?"
           27  +  append r " ?-key CODECKEY?"
    29     28   }
    30     29   do_test tcl-1.1 {
    31     30     set v [catch {sqlite3 bogus} msg]
    32     31     regsub {really_sqlite3} $msg {sqlite3} msg
    33     32     lappend v $msg
    34     33   } [list 1 "wrong # args: should be \"$r\""]
    35     34   do_test tcl-1.2 {

Changes to test/tkt4018.test.

    12     12   #
    13     13   # This file implements tests to verify that ticket #4018 has been
    14     14   # fixed.  
    15     15   #
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
           19  +do_not_use_codec
    19     20   
    20     21   proc testsql {sql} {
    21     22     set fd [open tf_main.tcl w]
    22     23     puts $fd [subst -nocommands {
    23     24       sqlite3_test_control_pending_byte 0x0010000
    24     25       sqlite3 db test.db
    25     26       set rc [catch { db eval {$sql} } msg]

Changes to test/wal.test.

  1374   1374   do_test wal-21.3 {
  1375   1375     execsql { PRAGMA integrity_check }
  1376   1376   } {ok}
  1377   1377   
  1378   1378   #-------------------------------------------------------------------------
  1379   1379   # Test reading and writing of databases with different page-sizes.
  1380   1380   #
         1381  +incr ::do_not_use_codec
  1381   1382   foreach pgsz {512 1024 2048 4096 8192 16384 32768 65536} {
  1382   1383     do_multiclient_test tn [string map [list %PGSZ% $pgsz] {
  1383   1384       do_test wal-22.%PGSZ%.$tn.1 {
  1384   1385         sql1 {
  1385   1386           PRAGMA main.page_size = %PGSZ%;
  1386   1387           PRAGMA auto_vacuum = 0;
  1387   1388           PRAGMA journal_mode = WAL;
................................................................................
  1394   1395       do_test wal-22.%PGSZ%.$tn.2 { sql2 { PRAGMA integrity_check } } {ok}
  1395   1396       do_test wal-22.%PGSZ%.$tn.3 {
  1396   1397         sql1 {PRAGMA wal_checkpoint}
  1397   1398         expr {[file size test.db] % %PGSZ%}
  1398   1399       } {0}
  1399   1400     }]
  1400   1401   }
         1402  +incr ::do_not_use_codec -1
  1401   1403   
  1402   1404   #-------------------------------------------------------------------------
  1403   1405   # Test that when 1 or more pages are recovered from a WAL file, 
  1404   1406   # sqlite3_log() is invoked to report this to the user.
  1405   1407   #
  1406   1408   ifcapable curdir {
  1407   1409     set walfile [file nativename [file join [get_pwd] test.db-wal]]

Changes to test/wal5.test.

    14     14   #
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   source $testdir/lock_common.tcl
    19     19   source $testdir/wal_common.tcl
    20     20   ifcapable !wal {finish_test ; return }
           21  +do_not_use_codec
    21     22   
    22     23   set testprefix wal5
    23     24   
    24     25   proc db_page_count  {{file test.db}} { expr [file size $file] / 1024 }
    25     26   proc wal_page_count {{file test.db}} { wal_frame_count ${file}-wal 1024 }
    26     27   
    27     28   

Changes to test/wal8.test.

    23     23   # first read transaction is executed), and the "PRAGMA page_size = XXX"
    24     24   # is a no-op.
    25     25   #
    26     26   set testdir [file dirname $argv0]
    27     27   source $testdir/tester.tcl
    28     28   set ::testprefix wal8
    29     29   ifcapable !wal {finish_test ; return }
           30  +do_not_use_codec
    30     31   
    31     32   db close
    32     33   forcedelete test.db test.db-wal
    33     34   
    34     35   sqlite3 db test.db
    35     36   sqlite3 db2 test.db
    36     37   

Changes to test/walbak.test.

   236    236         PRAGMA page_size = 2048;
   237    237         PRAGMA journal_mode = PERSIST;
   238    238         CREATE TABLE xx(x);
   239    239       }
   240    240     }
   241    241   
   242    242   } {
          243  +  if {$tn==4 && [sqlite3 -has-codec]} continue
   243    244     foreach f [glob -nocomplain test.db*] { forcedelete $f }
   244    245   
   245    246     eval $setup
   246    247   
   247    248     do_test walbak-3.$tn.1 {
   248    249       execsql {
   249    250         CREATE TABLE t1(a, b);

Changes to test/walro.test.

   208    208         INSERT INTO t2 SELECT x||y, y||x FROM t2;
   209    209         INSERT INTO t2 SELECT x||y, y||x FROM t2;
   210    210         INSERT INTO t2 SELECT x||y, y||x FROM t2;
   211    211         INSERT INTO t2 SELECT x||y, y||x FROM t2;
   212    212         INSERT INTO t2 SELECT x||y, y||x FROM t2;
   213    213       }
   214    214       file size test.db-wal
   215         -  } {147800}
          215  +  } [expr {[nonzero_reserved_bytes]?148848:147800}]
   216    216     do_test 1.4.4.2 {
   217    217       csql1 { SELECT * FROM t1 }
   218    218     } {0 {a b c d e f g h i j k l 1 2 3 4 5 6}}
   219    219     do_test 1.4.4.3 {
   220    220       csql2 COMMIT
   221    221       csql1 { SELECT count(*) FROM t2 }
   222    222     } {0 512}