1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Omit wal mode tests in memdb1.test for builds and configurations that do not support wal mode.

FossilOrigin-Name: 0f13c0d9fd7757c6e0b845a285c0047d2c60293354335660d19d80ad799646fc
This commit is contained in:
dan
2021-11-22 16:50:41 +00:00
parent b127d0fd2a
commit 70a05e9168
3 changed files with 40 additions and 38 deletions

View File

@ -233,36 +233,38 @@ ifcapable vtab {
#-------------------------------------------------------------------------
# dbsqlfuzz 0a13dfb474d4f2f11a48a2ea57075c96fb456dd7
#
reset_db
do_execsql_test 800 {
PRAGMA auto_vacuum = 0;
PRAGMA page_size = 8192;
PRAGMA journal_mode = wal;
CREATE TABLE t1(x, y);
INSERT INTO t1 VALUES(1, 2);
CREATE TABLE t2(x, y);
} {wal}
db close
set fd [open test.db]
fconfigure $fd -translation binary -encoding binary
set data [read $fd [expr 20*1024]]
sqlite3 db ""
db deserialize $data
do_execsql_test 810 {
PRAGMA locking_mode = exclusive;
SELECT * FROM t1
} {exclusive 1 2}
do_execsql_test 820 {
INSERT INTO t1 VALUES(3, 4);
SELECT * FROM t1;
} {1 2 3 4}
do_catchsql_test 830 {
PRAGMA wal_checkpoint;
} {1 {database disk image is malformed}}
if {[wal_is_capable]} {
reset_db
do_execsql_test 800 {
PRAGMA auto_vacuum = 0;
PRAGMA page_size = 8192;
PRAGMA journal_mode = wal;
CREATE TABLE t1(x, y);
INSERT INTO t1 VALUES(1, 2);
CREATE TABLE t2(x, y);
} {wal}
db close
set fd [open test.db]
fconfigure $fd -translation binary -encoding binary
set data [read $fd [expr 20*1024]]
sqlite3 db ""
db deserialize $data
do_execsql_test 810 {
PRAGMA locking_mode = exclusive;
SELECT * FROM t1
} {exclusive 1 2}
do_execsql_test 820 {
INSERT INTO t1 VALUES(3, 4);
SELECT * FROM t1;
} {1 2 3 4}
do_catchsql_test 830 {
PRAGMA wal_checkpoint;
} {1 {database disk image is malformed}}
}
finish_test