/ Check-in [ba9848e7]
Login

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

Overview
Comment:Update the error message on one of the corruption tests to account for the fact that we are finding the corruption sooner. (CVS 6726)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ba9848e7b89df1fb6bf6db2b9d66cd3ffce375df
User & Date: drh 2009-06-06 19:21:13
Context
2009-06-07
23:45
Disable the LIKE optimization if the affinity of the LHS column is not TEXT. Ticket #3901. (CVS 6727) check-in: a255c645 user: drh tags: trunk
2009-06-06
19:21
Update the error message on one of the corruption tests to account for the fact that we are finding the corruption sooner. (CVS 6726) check-in: ba9848e7 user: drh tags: trunk
16:08
Fix an error in the malloc.test test script causing a small buffer overread. (CVS 6725) check-in: 4d129bee user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/corruptC.test.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# 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.  It creates a base
# data base file, then tests that single byte corruptions in 
# increasingly larger quantities are handled gracefully.
#
# $Id: corruptC.test,v 1.12 2009/06/04 02:46:20 shane Exp $

catch {file delete -force test.db test.db-journal test.bu}

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

# Construct a compact, dense database for testing.
................................................................................
  copy_file test.bu test.db

  # insert corrupt byte(s)
  hexio_write test.db 2053 [format %02x 0x04]

  sqlite3 db test.db
  catchsql {PRAGMA integrity_check}
} {0 {{*** in database main ***
Corruption detected in header on page 3}}}

# test that a corrupt content offset size is handled (seed 5649)
do_test corruptC-2.2 {
  db close
  copy_file test.bu test.db

  # insert corrupt byte(s)







|







 







|
<







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104
# 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.  It creates a base
# data base file, then tests that single byte corruptions in 
# increasingly larger quantities are handled gracefully.
#
# $Id: corruptC.test,v 1.13 2009/06/06 19:21:13 drh Exp $

catch {file delete -force test.db test.db-journal test.bu}

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

# Construct a compact, dense database for testing.
................................................................................
  copy_file test.bu test.db

  # insert corrupt byte(s)
  hexio_write test.db 2053 [format %02x 0x04]

  sqlite3 db test.db
  catchsql {PRAGMA integrity_check}
} {1 {database disk image is malformed}}


# test that a corrupt content offset size is handled (seed 5649)
do_test corruptC-2.2 {
  db close
  copy_file test.bu test.db

  # insert corrupt byte(s)