SQLite

Check-in [858f62274e]
Login

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

Overview
Comment:Fix a test script problem in fts5corrupt3.test.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 858f62274eb727109d0452ad2d80c0e0acab0f569494b1218c404501e103ed39
User & Date: dan 2019-04-13 16:35:02.509
Context
2019-04-13
16:43
Fix the fts3varint.test script so that it works even on versions of TCL for which Tcl_GetWideIntFromObj() does not work. (check-in: 53f787ad29 user: drh tags: trunk)
16:35
Fix a test script problem in fts5corrupt3.test. (check-in: 858f62274e user: dan tags: trunk)
15:07
Partially revert the test file changes in [4371a0c46e]. It is no longer required following [93ae382e97c23c90]. (check-in: 593a7e6e20 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/fts5/test/fts5corrupt3.test.
7990
7991
7992
7993
7994
7995
7996
7997

7998
7999









8000
8001
8002
8003
8004
8005
8006
|   4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04   gsz.....version.
| page 6 offset 20480
|      0: 0d 00 00 00 03 0f f2 00 0f fc 0f f7 0f f2 00 00   ................
|   4080: 00 00 03 03 02 01 03 03 02 02 01 02 02 01 02 09   ................
| end crash-2acc487d09f033.db
}]} {}

do_catchsql_test 56.1 {

  INSERT INTO t1(b) VALUES(randomblob(250));
  INSERT INTO t1(b) VALUES(randomblob(250));









} {1 {database disk image is malformed}}

#-------------------------------------------------------------------------
reset_db
do_test 57.0 {
  sqlite3 db {}
  db deserialize [decode_hexdb {







|
>
|
|
>
>
>
>
>
>
>
>
>







7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
|   4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04   gsz.....version.
| page 6 offset 20480
|      0: 0d 00 00 00 03 0f f2 00 0f fc 0f f7 0f f2 00 00   ................
|   4080: 00 00 03 03 02 01 03 03 02 02 01 02 02 01 02 09   ................
| end crash-2acc487d09f033.db
}]} {}

do_test 56.1 {
  set res [catchsql {
    INSERT INTO t1(b) VALUES(randomblob(250));
    INSERT INTO t1(b) VALUES(randomblob(250));
  }]

  # For some permutations - those that use the page-cache - this test
  # may return SQLITE_CONSTRAINT instead of SQLITE_CORRUPT. This is because
  # the corrupt db in the test over-reads the page buffer slightly, with
  # different results depending on whether or not the page-cache is in use.
  if {$res=="1 {constraint failed}"} {
    set res "1 {database disk image is malformed}"
  }
} {1 {database disk image is malformed}}

#-------------------------------------------------------------------------
reset_db
do_test 57.0 {
  sqlite3 db {}
  db deserialize [decode_hexdb {