SQLite

Check-in [4a77ff5b58]
Login

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

Overview
Comment:Adjust the error-message text in corrupt7.test. (CVS 5205)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4a77ff5b588f4c83959591c208a8b20224b75a66
User & Date: drh 2008-06-11 18:56:42.000
Context
2008-06-12
00:07
Additional refinements to the new sqlite3_initialize() interface design. (CVS 5206) (check-in: 14a9b9453b user: drh tags: trunk)
2008-06-11
18:56
Adjust the error-message text in corrupt7.test. (CVS 5205) (check-in: 4a77ff5b58 user: drh tags: trunk)
18:27
Fix an error in the previous commit found by corrupt7.test. (CVS 5204) (check-in: afcfba0a8a user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/corrupt7.test.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#***********************************************************************
# 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 specifically focuses
# on corrupt cell offsets in a btree page.
#
# $Id: corrupt7.test,v 1.1 2008/06/11 18:01:22 drh Exp $

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

# We must have the page_size pragma for these tests to work.
#
ifcapable !pager_pragmas {







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#***********************************************************************
# 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 specifically focuses
# on corrupt cell offsets in a btree page.
#
# $Id: corrupt7.test,v 1.2 2008/06/11 18:56:42 drh Exp $

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

# We must have the page_size pragma for these tests to work.
#
ifcapable !pager_pragmas {
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
do_test corrupt7-2.1 {
  db close
  hexio_write test.db 1062 FF
  sqlite3 db test.db
  db eval {PRAGMA integrity_check(1)}
} {{*** in database main ***
Corruption detected in cell 15 on page 2}}
do_test corrupt7-2.2 {
  db close
  hexio_write test.db 1062 04
  sqlite3 db test.db
  db eval {PRAGMA integrity_check(1)}
} {{*** in database main ***
Corruption detected in cell 15 on page 2}}

finish_test







|






|


59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
do_test corrupt7-2.1 {
  db close
  hexio_write test.db 1062 FF
  sqlite3 db test.db
  db eval {PRAGMA integrity_check(1)}
} {{*** in database main ***
Page 2: sqlite3BtreeInitPage() returns error code 11}}
do_test corrupt7-2.2 {
  db close
  hexio_write test.db 1062 04
  sqlite3 db test.db
  db eval {PRAGMA integrity_check(1)}
} {{*** in database main ***
Page 2: sqlite3BtreeInitPage() returns error code 11}}

finish_test