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:
@ -1 +1 @@
|
|||||||
2a167cfbb2abd76e1b33116b671e58a767fc972dd79bee0004aad09a1dd2b487
|
680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f
|
@ -1303,8 +1303,9 @@ 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
|
||||||
|
do_execsql_test 17.0 {
|
||||||
CREATE TABLE t1(o INTEGER PRIMARY KEY, t UNIQUE);
|
CREATE TABLE t1(o INTEGER PRIMARY KEY, t UNIQUE);
|
||||||
INSERT INTO t1(t) VALUES(randomblob(123));
|
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;
|
||||||
@ -1316,21 +1317,22 @@ do_execsql_test 17.0 {
|
|||||||
|
|
||||||
PRAGMA journal_mode = wal;
|
PRAGMA journal_mode = wal;
|
||||||
INSERT INTO t1 VALUES(-1, 'b');
|
INSERT INTO t1 VALUES(-1, 'b');
|
||||||
} {wal}
|
} {wal}
|
||||||
|
|
||||||
do_test 17.1 {
|
do_test 17.1 {
|
||||||
set fd [open test.db r+]
|
set fd [open test.db r+]
|
||||||
chan truncate $fd 2048
|
chan truncate $fd 2048
|
||||||
file size test.db
|
file size test.db
|
||||||
} {2048}
|
} {2048}
|
||||||
|
|
||||||
do_catchsql_test 17.2 {
|
do_catchsql_test 17.2 {
|
||||||
PRAGMA wal_checkpoint
|
PRAGMA wal_checkpoint
|
||||||
} {1 {database disk image is malformed}}
|
} {1 {database disk image is malformed}}
|
||||||
|
|
||||||
do_test 17.3 {
|
do_test 17.3 {
|
||||||
close $fd
|
close $fd
|
||||||
} {}
|
} {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
Reference in New Issue
Block a user