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

Fix a file-descriptor leak in test script corruptL.test.

FossilOrigin-Name: ec2c340c39bc78e4bce0eb01ea408c95ba121103cc77f300f29f3001fc345c20
This commit is contained in:
dan
2020-08-07 18:52:03 +00:00
parent 88819d5870
commit 26b9540fc2
3 changed files with 17 additions and 9 deletions

View File

@ -1295,6 +1295,11 @@ do_catchsql_test 16.1 {
} {1 {database disk image is malformed}}
#-------------------------------------------------------------------------
# Test that corruption is reported from within a checkpoint if the
# expected final size of the database (according to the last commit
# 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);
@ -1316,10 +1321,13 @@ do_test 17.1 {
file size test.db
} {2048}
breakpoint
do_catchsql_test 17.1 {
do_catchsql_test 17.2 {
PRAGMA wal_checkpoint
} {1 {database disk image is malformed}}
do_test 17.3 {
close $fd
} {}
finish_test