SQLite

Check-in [12f2d24f88]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clear the $result variable prior to using it in corrupt2.test. (CVS 5624)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 12f2d24f88e55d170dd7750e7904ff14e84e820e
User & Date: drh 2008-08-27 16:14:21.000
Context
2008-08-27
16:38
Modifications to malloc5.test to account for the fact that sqlite3_release_memory() no longer reclaims dirty pages. (CVS 5625) (check-in: b01c65b065 user: danielk1977 tags: trunk)
16:14
Clear the $result variable prior to using it in corrupt2.test. (CVS 5624) (check-in: 12f2d24f88 user: drh tags: trunk)
15:21
In the test logic: load the md5sum() SQL function as a separate autoloaded extension. (CVS 5623) (check-in: d4438251dd user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/corrupt2.test.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests to make sure SQLite does not crash or
# segfault if it sees a corrupt database file.
#
# $Id: corrupt2.test,v 1.14 2008/08/02 20:09:37 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# The following tests - corrupt2-1.* - create some databases corrupted in
# specific ways and ensure that SQLite detects them as corrupt.
#







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests to make sure SQLite does not crash or
# segfault if it sees a corrupt database file.
#
# $Id: corrupt2.test,v 1.15 2008/08/27 16:14:21 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# The following tests - corrupt2-1.* - create some databases corrupted in
# specific ways and ensure that SQLite detects them as corrupt.
#
175
176
177
178
179
180
181

182
183
184
185
186
187
188

do_test corrupt2-4.1 {
  catchsql {
    SELECT * FROM t2;
  } db2
} {1 {database disk image is malformed}}


do_test corrupt2-5.1 {
  file delete -force corrupt.db
  file delete -force corrupt.db-journal
  sqlite3 db2 corrupt.db 

  execsql {
    PRAGMA auto_vacuum = 0;







>







175
176
177
178
179
180
181
182
183
184
185
186
187
188
189

do_test corrupt2-4.1 {
  catchsql {
    SELECT * FROM t2;
  } db2
} {1 {database disk image is malformed}}

unset -nocomplain result
do_test corrupt2-5.1 {
  file delete -force corrupt.db
  file delete -force corrupt.db-journal
  sqlite3 db2 corrupt.db 

  execsql {
    PRAGMA auto_vacuum = 0;