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

Fix a problem causing test failures in corruptL.test for some permutations.

FossilOrigin-Name: 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f
This commit is contained in:
dan
2020-08-10 19:35:01 +00:00
parent 26c48d2aab
commit 9f567eb9f5
3 changed files with 1914 additions and 35 deletions

1889
manifest

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
2a167cfbb2abd76e1b33116b671e58a767fc972dd79bee0004aad09a1dd2b487 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f

View File

@ -1303,34 +1303,36 @@ do_catchsql_test 16.1 {
# frame in the wal file) is greater than the combined initial sizes # frame in the wal file) is greater than the combined initial sizes
# of the database and wal file. # of the database and wal file.
# #
reset_db if {[wal_is_capable]} {
do_execsql_test 17.0 { reset_db
CREATE TABLE t1(o INTEGER PRIMARY KEY, t UNIQUE); do_execsql_test 17.0 {
INSERT INTO t1(t) VALUES(randomblob(123)); CREATE TABLE t1(o INTEGER PRIMARY KEY, t UNIQUE);
INSERT INTO t1(t) SELECT randomblob(123) FROM t1; 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;
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'); PRAGMA journal_mode = wal;
} {wal} INSERT INTO t1 VALUES(-1, 'b');
} {wal}
do_test 17.1 {
set fd [open test.db r+] do_test 17.1 {
chan truncate $fd 2048 set fd [open test.db r+]
file size test.db chan truncate $fd 2048
} {2048} file size test.db
} {2048}
do_catchsql_test 17.2 {
PRAGMA wal_checkpoint do_catchsql_test 17.2 {
} {1 {database disk image is malformed}} PRAGMA wal_checkpoint
} {1 {database disk image is malformed}}
do_test 17.3 {
close $fd do_test 17.3 {
} {} close $fd
} {}
}
finish_test finish_test