Fix a problem causing the recovery extension to use excessive memory and CPU time...
[sqlite.git] / test / chunksize.test
blob47d118d841db286103a5e4fa5a35186161dac9a3
1 # 2019 June 5
3 # The author disclaims copyright to this source code.  In place of
4 # a legal notice, here is a blessing:
6 #    May you do good and not evil.
7 #    May you find forgiveness for yourself and forgive others.
8 #    May you share freely, never taking more than you give.
10 #***********************************************************************
13 set testdir [file dirname $argv0]
14 source $testdir/tester.tcl
15 set testprefix chunksize
17 if {$::tcl_platform(platform)!="unix"} {
18   finish_test
19   return
22 foreach {tn jrnlmode} {
23   1 delete
24   2 wal
25 } {
26   reset_db
27   file_control_chunksize_test db main 32768
28   do_execsql_test $tn.0 " PRAGMA journal_mode = $jrnlmode " $jrnlmode
29   do_execsql_test $tn.1 {
30     CREATE TABLE t1(a, b);
31     INSERT INTO t1 VALUES(1, 2);
32   }
34   execsql { PRAGMA wal_checkpoint }
36   do_test $tn.2 {
37     file size test.db
38   } 32768
41 finish_test