mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix a problem causing test failures in corruptL.test for some permutations.
FossilOrigin-Name: 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f
This commit is contained in:
@ -1303,34 +1303,36 @@ do_catchsql_test 16.1 {
|
||||
# frame in the wal file) is greater than the combined initial sizes
|
||||
# of the database and wal file.
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 17.0 {
|
||||
CREATE TABLE t1(o INTEGER PRIMARY KEY, t UNIQUE);
|
||||
INSERT INTO t1(t) VALUES(randomblob(123));
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
|
||||
PRAGMA journal_mode = wal;
|
||||
INSERT INTO t1 VALUES(-1, 'b');
|
||||
} {wal}
|
||||
|
||||
do_test 17.1 {
|
||||
set fd [open test.db r+]
|
||||
chan truncate $fd 2048
|
||||
file size test.db
|
||||
} {2048}
|
||||
|
||||
do_catchsql_test 17.2 {
|
||||
PRAGMA wal_checkpoint
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
do_test 17.3 {
|
||||
close $fd
|
||||
} {}
|
||||
if {[wal_is_capable]} {
|
||||
reset_db
|
||||
do_execsql_test 17.0 {
|
||||
CREATE TABLE t1(o INTEGER PRIMARY KEY, t UNIQUE);
|
||||
INSERT INTO t1(t) VALUES(randomblob(123));
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
INSERT INTO t1(t) SELECT randomblob(123) FROM t1;
|
||||
|
||||
PRAGMA journal_mode = wal;
|
||||
INSERT INTO t1 VALUES(-1, 'b');
|
||||
} {wal}
|
||||
|
||||
do_test 17.1 {
|
||||
set fd [open test.db r+]
|
||||
chan truncate $fd 2048
|
||||
file size test.db
|
||||
} {2048}
|
||||
|
||||
do_catchsql_test 17.2 {
|
||||
PRAGMA wal_checkpoint
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
do_test 17.3 {
|
||||
close $fd
|
||||
} {}
|
||||
}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user