-C Add\stests\scases\sfor\srecovery\sin\swal2\smode.
-D 2018-12-13T16:26:43.514
+C Add\sfurther\stests\sfor\swal2\smode.
+D 2018-12-14T19:53:39.654
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F Makefile.in 68d0ba0f0b533d5bc84c78c13a6ce84ee81183a67014caa47a969e67f028fa1c
F src/vdbetrace.c 79d6dbbc479267b255a7de8080eee6e729928a0ef93ed9b0bfa5618875b48392
F src/vtab.c 70188a745dc4e57d26e942681ff4b2912b7c8249ad5de3f60f0677b4337bcfaa
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
-F src/wal.c 93389c399264ca3e0728b7bc2565b4ee6a9099b78929e633ffad3bcd493e415e
+F src/wal.c 1deb1d320b5de56407172ac21577d2bbf5c6ea52dcc0f5315a8d926d4839146e
F src/wal.h d2a69695c84137f76e19a247a342cb02ab0131001b6f58153d94b71195bbd84d
F src/walker.c fb94aadc9099ff9c6506d0a8b88d51266005bcaa265403f3d7caf732a562eb66
F src/where.c 3818e8a736a05d2cb194e64399af707e367fbcc5c251d785804d02eaf121288e
F test/pcache.test c8acbedd3b6fd0f9a7ca887a83b11d24a007972b
F test/pcache2.test af7f3deb1a819f77a6d0d81534e97d1cf62cd442
F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff
-F test/permutations.test 57c9f829d72c91c89ae08febe205b73ec22751f476b4dafeafb614dfd263d74c
+F test/permutations.test f97a5613430a62ef5fb5aafeb37d4e857dea44e47c31064f154c7049c25b292b
F test/pg_common.tcl 301ac19c1a52fd55166d26db929b3b89165c634d52b5f8ad76ea8cb06960db30
F test/pragma.test c267bf02742c823a191960895b3d52933cebd7beee26757d1ed694f213fcd867
F test/pragma2.test e5d5c176360c321344249354c0c16aec46214c9f
F test/wal.test 613efec03e517e1775d86b993a54877d2e29a477
F test/wal2.test 155b9efa999bdb38ce1cd729b9a4fcdbffd6b88be27f039bad1d2929d287d918
F test/wal2big.test 0b4ec526f9ca4bbabc355042c38045ae2e253fb46eb327bb7693d0122bc6968b
-F test/wal2recover.test 4f14625c65cdb6132e061f85d2d441f8bb96aea4b20d4261bcf14041d8e1a735
+F test/wal2recover.test 64155a1f13ac434ebb374f109b9daa2b52c3ca69db9199be0bcbabb9727cae4e
F test/wal2rewrite.test 6ca6f631ffcf871240beab5f02608913fd075c6d0d31310b026c8383c65c9f9c
+F test/wal2savepoint.test 29725383e7eb8b78fed46333d69dc45b4ed321db43ecc81766aadea991874bef
F test/wal2simple.test 96206c98bf64ab20ec00a1c0f6c709e258b98b39f2149889361f31966ce5a703
F test/wal2snapshot.test 95a919e1c73dee0e0212d10931d03cc1116f68a0ff603163e551aaa5ac7025c1
F test/wal3.test 2a93004bc0fb2b5c29888964024695bade278ab2
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P e3e50bcdab8c91e003942d84430b3e580e034141236d19dda0e8af4ecf0e085b
-R e3b17b10c3f7dc5dae3bc5cc7a744091
+P 34f56f8a4239781071edf6317723d0a7333249551c2c1ce7ed39fc116d53d780
+R cabac54018fcd32b9b9c7e5679bc38f9
U dan
-Z 6979d16521822ff458ef9e063c382318
+Z be9d783248b67e630efcf341b29cd59e
-34f56f8a4239781071edf6317723d0a7333249551c2c1ce7ed39fc116d53d780
\ No newline at end of file
+54e628f902a5508badc8941ceda1bec12fe8f58969c91c670a37888ef2681880
\ No newline at end of file
}
sqlite3_free(aFrame);
- }else if( pbZero && nSize==0 ){
+ }else if( pbZero ){
*pbZero = 1;
}
}
test_suite "coverage-wal" -description {
Coverage tests for file wal.c.
} -files {
- wal.test wal2.test wal3.test walmode.test
- walbak.test walhook.test walcrash2.test walcksum.test
- walfault.test walbig.test walnoshm.test
- wal5.test
+wal2big.test wal2recover.test wal2rewrite.test
+wal2simple.test wal2snapshot.test wal2.test
+wal3.test wal4.test wal5.test
+wal64k.test wal6.test wal7.test wal8.test wal9.test
+walbak.test walbig.test walblock.test walcksum.test
+walfault.test walhook.test walmode.test walnoshm.test
+waloverwrite.test walpersist.test walprotocol2.test
+walprotocol.test walro2.test walrofault.test walro.test
+walshared.test walslow.test wal.test
+wal2savepoint.test
}
test_suite "coverage-pager" -description {
} db2
} {0 0 ok}
+#-------------------------------------------------------------------------
+#
+reset_db
+do_execsql_test 3.0 {
+ CREATE TABLE t1(a TEXT, b TEXT, c TEXT);
+ CREATE INDEX t1a ON t1(a);
+ CREATE INDEX t1b ON t1(b);
+ CREATE INDEX t1c ON t1(c);
+ PRAGMA journal_mode = wal2;
+ PRAGMA journal_size_limit = 10000;
+ PRAGMA wal_autocheckpoint = 0;
+ PRAGMA cache_size = 5;
+} {wal2 10000 0}
+
+do_execsql_test 3.1 {
+ WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s where i < 200)
+ INSERT INTO t1 SELECT i, i, i FROM s;
+
+ INSERT INTO t1 VALUES(201, 201, 201);
+} {}
+
+do_test 3.2 {
+ list [file size test.db] [file size test.db-wal] [file size test.db-wal2]
+} {5120 15752 4224}
+
+do_test 3.3 {
+ forcecopy test.db test.db2
+ forcecopy test.db-wal test.db2-wal
+ forcecopy test.db-wal2 test.db2-wal2
+ sqlite3 db2 test.db2
+ execsql {
+ PRAGMA journal_size_limit = 10000;
+ PRAGMA wal_autocheckpoint = 0;
+ PRAGMA cache_size = 5;
+ BEGIN;
+ WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s where i < 200)
+ INSERT INTO t1 SELECT i, i, i FROM s;
+ } db2
+ list [file size test.db2] [file size test.db2-wal] [file size test.db2-wal2]
+} {5120 15752 23088}
+
+do_test 3.4 {
+ set fd [open test.db2-shm]
+ fconfigure $fd -encoding binary -translation binary
+ set data [read $fd]
+ close $fd
+
+ set fd [open test.db-shm w]
+ fconfigure $fd -encoding binary -translation binary
+ puts -nonewline $fd $data
+ close $fd
+
+ execsql {
+ WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s where i < 10)
+ INSERT INTO t1 SELECT i, i, i FROM s;
+ SELECT count(*) FROM t1;
+ PRAGMA integrity_check;
+ }
+} {211 ok}
+
+do_test 3.5 {
+ list [file size test.db] [file size test.db-wal] [file size test.db-wal2]
+} {5120 15752 18896}
+
+#-------------------------------------------------------------------------
+#
+reset_db
+do_execsql_test 4.0 {
+ PRAGMA journal_mode = wal2;
+ CREATE TABLE xyz(x, y, z);
+ INSERT INTO xyz VALUES('x', 'y', 'z');
+} {wal2}
+db close
+do_test 4.1 {
+ close [open test.db-wal w]
+ file mkdir test.db-wal2
+ sqlite3 db test.db
+ catchsql { SELECT * FROM xyz }
+} {1 {unable to open database file}}
+db close
+file delete test.db-wal2
+
+do_test 4.2 {
+ sqlite3 db test.db
+ execsql {
+ INSERT INTO xyz VALUES('a', 'b', 'c');
+ }
+ forcecopy test.db test.db2
+ forcecopy test.db-wal test.db2-wal
+ forcedelete test.db2-wal2
+ file mkdir test.db2-wal2
+ sqlite3 db2 test.db2
+ catchsql { SELECT * FROM xyz } db2
+} {1 {unable to open database file}}
+db2 close
+file delete test.db2-wal2
+
+
+
finish_test
--- /dev/null
+# 2018 December 13
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#***********************************************************************
+# This file implements regression tests for SQLite library. The
+# focus of this file is testing the operation of the library in
+# "PRAGMA journal_mode=WAL2" mode.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+source $testdir/lock_common.tcl
+source $testdir/malloc_common.tcl
+source $testdir/wal_common.tcl
+
+set testprefix wal2savepoint
+ifcapable !wal {finish_test ; return }
+
+do_execsql_test 1.0 {
+ CREATE TABLE t1(a, b, c);
+ CREATE INDEX t1a ON t1(a);
+ CREATE INDEX t1b ON t1(b);
+ CREATE INDEX t1c ON t1(c);
+ PRAGMA journal_mode = wal2;
+ PRAGMA journal_size_limit = 15000;
+ PRAGMA wal_autocheckpoint = 0;
+ PRAGMA cache_size = 5;
+} {wal2 15000 0}
+
+do_execsql_test 1.1 {
+ WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s where i < 200)
+ INSERT INTO t1 SELECT random(), random(), random() FROM s;
+} {}
+
+do_test 1.2 {
+ list [file size test.db] [file size test.db-wal] [file size test.db-wal2]
+} {5120 23088 0}
+
+do_execsql_test 1.3 {
+ BEGIN;
+ SAVEPOINT abc;
+ WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s where i < 100)
+ INSERT INTO t1 SELECT random(), random(), random() FROM s;
+ ROLLBACK TO abc;
+ WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s where i < 10)
+ INSERT INTO t1 SELECT random(), random(), random() FROM s;
+ COMMIT;
+ SELECT count(*) FROM t1;
+ PRAGMA integrity_check;
+} {210 ok}
+
+
+finish_test
+