1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add tests for different page sizes to wal.test. Including 64K pages.

FossilOrigin-Name: d95bcc052910cfd4848afe0d32f717506ad5a789
This commit is contained in:
dan
2010-08-16 19:23:02 +00:00
parent 994e940323
commit 4bcc4988f1
3 changed files with 32 additions and 8 deletions

View File

@ -58,7 +58,7 @@ proc log_deleted {logfile} {
# wal-6.*: Test creating databases with different page sizes.
#
#
#
do_test wal-0.1 {
execsql { PRAGMA auto_vacuum = 0 }
execsql { PRAGMA synchronous = normal }
@ -1444,4 +1444,28 @@ do_test wal-21.3 {
execsql { PRAGMA integrity_check }
} {ok}
#-------------------------------------------------------------------------
# Test reading and writing of databases with different page-sizes.
#
foreach pgsz {512 1024 2048 4096 8192 16384 32768 65536} {
do_multiclient_test tn [string map [list %PGSZ% $pgsz] {
do_test e_expr-22.%PGSZ%.$tn.1 {
sql1 {
PRAGMA main.page_size = %PGSZ%;
PRAGMA auto_vacuum = 0;
PRAGMA journal_mode = WAL;
CREATE TABLE t1(x UNIQUE);
INSERT INTO t1 SELECT randomblob(800);
INSERT INTO t1 SELECT randomblob(800);
INSERT INTO t1 SELECT randomblob(800);
}
} {wal}
do_test e_expr-22.%PGSZ%.$tn.2 { sql2 { PRAGMA integrity_check } } {ok}
do_test e_expr-22.%PGSZ%.$tn.3 {
sql1 {PRAGMA wal_checkpoint}
expr {[file size test.db] % %PGSZ%}
} {0}
}]
}
finish_test