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 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing the operation of the library in
13 # "PRAGMA journal_mode=WAL" mode.
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
20 ifcapable !wal {finish_test ; return }
22 if {$tcl_platform(platform) != "unix"} {
28 test_syscall pagesize 65536
32 PRAGMA journal_mode = WAL;
34 CREATE INDEX i1 ON t1(x);
36 do_test 1.1 { file size test.db-shm } {65536}
40 while {[file size test.db-shm]==65536} {
41 execsql { INSERT INTO t1 VALUES( randstr(900,1100) ) }
51 sqlite3 db test.db -vfs unix-excl
54 PRAGMA journal_mode=WAL;
56 WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<8200)
57 INSERT INTO t1(a,b) SELECT x, zeroblob(300) FROM c;
58 PRAGMA integrity_check;
62 test_syscall pagesize -1