SQLite

Check-in [22177dac2e]
Login

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

Overview
Comment:Fix the corrupt7 tests to track changes in the integrity check error message. (CVS 5480)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 22177dac2e3cd9acafe7fcc71674a675fdd098ff
User & Date: drh 2008-07-25 14:53:17.000
Context
2008-07-25
15:39
Add the capability to track the maximum depth of the LALR(1) parser stack so that critical applications can check to see if they are getting close to limits. (CVS 5481) (check-in: ef0250f3dc user: drh tags: trunk)
14:53
Fix the corrupt7 tests to track changes in the integrity check error message. (CVS 5480) (check-in: 22177dac2e user: drh tags: trunk)
13:39
Increase limits on memsubsys1 tests to accomodate the larger structure sizes on 64-bit platforms. (CVS 5479) (check-in: f7720f1bfc user: drh 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.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 {







|







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.3 2008/07/25 14:53:17 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 ***
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







|






|


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