/ Check-in [858f6227]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 858f62274eb727109d0452ad2d80c0e0acab0f569494b1218c404501e103ed39
User & Date: dan 2019-04-13 16:35:02
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: 53f787ad user: drh tags: trunk
16:35
Fix a test script problem in fts5corrupt3.test. check-in: 858f6227 user: dan tags: trunk
15:07
Partially revert the test file changes in [4371a0c46e]. It is no longer required following [93ae382e97c23c90]. check-in: 593a7e6e user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/test/fts5corrupt3.test.

  7990   7990   |   4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04   gsz.....version.
  7991   7991   | page 6 offset 20480
  7992   7992   |      0: 0d 00 00 00 03 0f f2 00 0f fc 0f f7 0f f2 00 00   ................
  7993   7993   |   4080: 00 00 03 03 02 01 03 03 02 02 01 02 02 01 02 09   ................
  7994   7994   | end crash-2acc487d09f033.db
  7995   7995   }]} {}
  7996   7996   
  7997         -do_catchsql_test 56.1 {
  7998         -  INSERT INTO t1(b) VALUES(randomblob(250));
  7999         -  INSERT INTO t1(b) VALUES(randomblob(250));
         7997  +do_test 56.1 {
         7998  +  set res [catchsql {
         7999  +    INSERT INTO t1(b) VALUES(randomblob(250));
         8000  +    INSERT INTO t1(b) VALUES(randomblob(250));
         8001  +  }]
         8002  +
         8003  +  # For some permutations - those that use the page-cache - this test
         8004  +  # may return SQLITE_CONSTRAINT instead of SQLITE_CORRUPT. This is because
         8005  +  # the corrupt db in the test over-reads the page buffer slightly, with
         8006  +  # different results depending on whether or not the page-cache is in use.
         8007  +  if {$res=="1 {constraint failed}"} {
         8008  +    set res "1 {database disk image is malformed}"
         8009  +  }
  8000   8010   } {1 {database disk image is malformed}}
  8001   8011   
  8002   8012   #-------------------------------------------------------------------------
  8003   8013   reset_db
  8004   8014   do_test 57.0 {
  8005   8015     sqlite3 db {}
  8006   8016     db deserialize [decode_hexdb {