Update test cases in corruptI.test so that they work with both SQLITE_ENABLE_OVERSIZE_CELL_CHECK and SQLITE_DEFAULT_AUTOVACUUM builds.

FossilOrigin-Name: 22a14663782312fa7f4f18545509ef4b27e9b8c1
This commit is contained in:
dan
2015-05-26 14:57:45 +00:00
parent fb0246ba8a
commit 6c1944f659
3 changed files with 17 additions and 9 deletions
+10 -2
View File
@@ -123,13 +123,18 @@ do_execsql_test 4.0 {
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
#-------------------------------------------------------------------------
@@ -192,6 +197,7 @@ do_test 5.3 {
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));
@@ -210,6 +216,7 @@ do_test 6.1 {
#
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');
@@ -231,6 +238,7 @@ do_test 7.2 {
#
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));