Index: test/corruptI.test ================================================================== --- test/corruptI.test +++ test/corruptI.test @@ -121,17 +121,22 @@ } set root [db one {SELECT rootpage FROM sqlite_master}] set offset [expr ($root-1) * 65536] +ifcapable oversize_cell_check { + set res {1 {database disk image is malformed}} +} else { + set res {0 {}} +} do_test 4.1 { db close hexio_write test.db [expr $offset + 8 + 2] 0000 hexio_write test.db [expr $offset + 5] 0000 sqlite3 db test.db - execsql { DELETE FROM t1 WHERE a=0 } -} {} + catchsql { DELETE FROM t1 WHERE a=0 } +} $res #------------------------------------------------------------------------- # Database properties: # @@ -190,10 +195,11 @@ # point this led to an integer overflow that caused an assert() to fail. # reset_db do_execsql_test 6.0 { PRAGMA page_size = 512; + PRAGMA auto_vacuum=0; CREATE TABLE t1(x); INSERT INTO t1 VALUES(zeroblob(300)); INSERT INTO t1 VALUES(zeroblob(600)); } {} do_test 6.1 { @@ -208,10 +214,11 @@ # See what happens if the sqlite_master entry associated with a PRIMARY # KEY or UNIQUE index is removed. # reset_db do_execsql_test 7.0 { + PRAGMA auto_vacuum=0; CREATE TABLE t1(x PRIMARY KEY, y); INSERT INTO t1 VALUES('a', 'A'); INSERT INTO t1 VALUES('b', 'A'); INSERT INTO t1 VALUES('c', 'A'); SELECT name FROM sqlite_master; @@ -229,10 +236,11 @@ #------------------------------------------------------------------------- # At one point an assert() would fail if attempt was made to free page 1. # reset_db do_execsql_test 8.0 { + PRAGMA auto_vacuum=0; CREATE TABLE t1(x); INSERT INTO t1 VALUES(zeroblob(300)); INSERT INTO t1 VALUES(zeroblob(300)); INSERT INTO t1 VALUES(zeroblob(300)); INSERT INTO t1 VALUES(zeroblob(300));