diff --git a/ext/expert/sqlite3expert.c b/ext/expert/sqlite3expert.c index 695aaece8c..e88fb7e78c 100644 --- a/ext/expert/sqlite3expert.c +++ b/ext/expert/sqlite3expert.c @@ -644,6 +644,7 @@ static int idxRegisterVtab(sqlite3expert *p){ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + 0, /* xShadowName */ }; return sqlite3_create_module(p->dbv, "expert", &expertModule, (void*)p); diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c index 3897054c7c..5899d4f244 100644 --- a/ext/fts3/fts3.c +++ b/ext/fts3/fts3.c @@ -3846,8 +3846,23 @@ static int fts3RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){ return SQLITE_OK; } +/* +** Return true if zName is the extension on one of the shadow tables used +** by this module. +*/ +static int fts3ShadowName(const char *zName){ + static const char *azName[] = { + "content", "docsize", "segdir", "segments", "stat", + }; + unsigned int i; + for(i=0; i=0} {incr i -1} { do_execsql_test 2.$i.1 { BEGIN; @@ -248,6 +249,7 @@ foreach {tn hdr} { #-------------------------------------------------------------------- reset_db +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 6.1 { CREATE VIRTUAL TABLE x5 USING fts5(tt); INSERT INTO x5 VALUES('a'); diff --git a/ext/fts5/test/fts5corrupt3.test b/ext/fts5/test/fts5corrupt3.test index 72e9ab17c5..ec823b320f 100644 --- a/ext/fts5/test/fts5corrupt3.test +++ b/ext/fts5/test/fts5corrupt3.test @@ -51,6 +51,7 @@ do_test 1.1 { set {} {} } {} +sqlite3_db_config db DEFENSIVE 0 for {set i 0} {$i < $L} {incr i} { do_test 1.2.$i { catchsql { @@ -86,6 +87,7 @@ do_execsql_test 2.2 { # reset_db do_test 3.0 { create_t1 } {} +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 3.1 { SELECT count(*) FROM t1_data; @@ -158,6 +160,7 @@ do_3_test 3.10 # Test that segments that end unexpectedly are identified as corruption. # reset_db +sqlite3_db_config db DEFENSIVE 0 do_test 4.0 { execsql { CREATE VIRTUAL TABLE t1 USING fts5(x); @@ -182,6 +185,7 @@ for {set i 1} {1} {incr i} { db close sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 db eval { BEGIN; @@ -257,6 +261,7 @@ foreach rowid [db eval {SELECT rowid FROM x1_data WHERE rowid>100}] { #------------------------------------------------------------------------ # reset_db +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 6.1.0 { CREATE VIRTUAL TABLE t1 USING fts5(a); INSERT INTO t1 VALUES('bbbbb ccccc'); @@ -273,6 +278,7 @@ do_catchsql_test 6.1.2 { #------- reset_db +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 6.2.0 { CREATE VIRTUAL TABLE t1 USING fts5(a); INSERT INTO t1(t1, rank) VALUES('pgsz', 32); @@ -288,6 +294,7 @@ do_catchsql_test 6.2.2 { #------- reset_db +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 6.3.0 { CREATE VIRTUAL TABLE t1 USING fts5(a); INSERT INTO t1 VALUES('abc abcdef abcdefghi'); @@ -362,6 +369,7 @@ do_test 7.0 { } } {} +sqlite3_db_config db DEFENSIVE 0 do_test 7.1 { foreach i [db eval { SELECT rowid FROM t5_data WHERE rowid>100 }] { db eval BEGIN @@ -383,6 +391,7 @@ do_execsql_test 8.1 { INSERT INTO t1 VALUES('one', 'two'); } +sqlite3_db_config db DEFENSIVE 0 do_test 9.1.1 { set blob "12345678" ;# cookie append blob "0105" ;# 1 level, total of 5 segments diff --git a/ext/fts5/test/fts5first.test b/ext/fts5/test/fts5first.test index b2cac1fdf1..357672de68 100644 --- a/ext/fts5/test/fts5first.test +++ b/ext/fts5/test/fts5first.test @@ -93,4 +93,3 @@ do_catchsql_test 3.3 { SELECT * FROM x2('^a'); } {1 {fts5: phrase queries are not supported (detail!=full)}} finish_test - diff --git a/ext/fts5/test/fts5integrity.test b/ext/fts5/test/fts5integrity.test index a38b16461c..25c7277305 100644 --- a/ext/fts5/test/fts5integrity.test +++ b/ext/fts5/test/fts5integrity.test @@ -71,6 +71,7 @@ do_execsql_test 4.1 { INSERT INTO aa(aa) VALUES('integrity-check'); } +sqlite3_db_config db DEFENSIVE 0 do_catchsql_test 4.2 { BEGIN; UPDATE aa_docsize SET sz = X'44' WHERE rowid = 3; diff --git a/ext/fts5/test/fts5rank.test b/ext/fts5/test/fts5rank.test index 0a986b5005..e8f5473c4b 100644 --- a/ext/fts5/test/fts5rank.test +++ b/ext/fts5/test/fts5rank.test @@ -163,4 +163,3 @@ do_execsql_test 5.1 { } {30 31 32 33 34 35 36 37 38 39 40} finish_test - diff --git a/ext/fts5/test/fts5rebuild.test b/ext/fts5/test/fts5rebuild.test index 01918310f7..ae881c02f0 100644 --- a/ext/fts5/test/fts5rebuild.test +++ b/ext/fts5/test/fts5rebuild.test @@ -39,6 +39,7 @@ do_execsql_test 1.4 { INSERT INTO f1(f1) VALUES('integrity-check'); } {} +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.5 { DELETE FROM f1_data; } {} diff --git a/ext/fts5/test/fts5rowid.test b/ext/fts5/test/fts5rowid.test index e7fd1bc2c5..8935ecfea7 100644 --- a/ext/fts5/test/fts5rowid.test +++ b/ext/fts5/test/fts5rowid.test @@ -70,6 +70,7 @@ set res [db one {SELECT count(*) FROM x1_data}] do_execsql_test 2.3 { SELECT count(fts5_decode(rowid, block)) FROM x1_data; } $res +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 2.4 { UPDATE x1_data SET block = X''; SELECT count(fts5_decode(rowid, block)) FROM x1_data; diff --git a/ext/fts5/test/fts5version.test b/ext/fts5/test/fts5version.test index 58cd3488b7..60ec81c03d 100644 --- a/ext/fts5/test/fts5version.test +++ b/ext/fts5/test/fts5version.test @@ -36,9 +36,10 @@ do_execsql_test 1.3 { SELECT rowid FROM t1 WHERE t1 MATCH 'a'; } {1} +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.4 { UPDATE t1_config set v=5 WHERE k='version'; -} +} do_test 1.5 { db close @@ -53,6 +54,7 @@ do_test 1.6 { } {1 {invalid fts5 file format (found 5, expected 4) - run 'rebuild'}} do_test 1.7 { + sqlite3_db_config db DEFENSIVE 0 execsql { DELETE FROM t1_config WHERE k='version' } db close sqlite3 db test.db diff --git a/ext/fts5/test/fts5vocab.test b/ext/fts5/test/fts5vocab.test index 8c40316085..d3c8b760d7 100644 --- a/ext/fts5/test/fts5vocab.test +++ b/ext/fts5/test/fts5vocab.test @@ -420,6 +420,7 @@ if {[detail_is_none]} { set resc [row_to_col $resr] } do_execsql_test 8.1.1 { SELECT * FROM x1_r; } $resr do_execsql_test 8.1.2 { SELECT * FROM x1_c } $resc +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 8.2 { PRAGMA writable_schema = 1; UPDATE sqlite_master @@ -481,4 +482,3 @@ do_test 9.6 { finish_test - diff --git a/ext/fts5/test/fts5vocab2.test b/ext/fts5/test/fts5vocab2.test index 4a0a1f4e3d..9566441a46 100644 --- a/ext/fts5/test/fts5vocab2.test +++ b/ext/fts5/test/fts5vocab2.test @@ -206,4 +206,3 @@ do_execsql_test 3.5 { } finish_test - diff --git a/ext/misc/amatch.c b/ext/misc/amatch.c index 914e2633d4..142e354f28 100644 --- a/ext/misc/amatch.c +++ b/ext/misc/amatch.c @@ -1473,7 +1473,8 @@ static sqlite3_module amatchModule = { 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ - 0 /* xRollbackTo */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ }; #endif /* SQLITE_OMIT_VIRTUALTABLE */ diff --git a/ext/misc/btreeinfo.c b/ext/misc/btreeinfo.c index 131b210a79..3d818f20c0 100644 --- a/ext/misc/btreeinfo.c +++ b/ext/misc/btreeinfo.c @@ -411,6 +411,7 @@ int sqlite3BinfoRegister(sqlite3 *db){ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + 0 /* xShadowName */ }; return sqlite3_create_module(db, "sqlite_btreeinfo", &binfo_module, 0); } diff --git a/ext/misc/closure.c b/ext/misc/closure.c index 74bffc7708..03f13c0c79 100644 --- a/ext/misc/closure.c +++ b/ext/misc/closure.c @@ -938,7 +938,8 @@ static sqlite3_module closureModule = { 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ - 0 /* xRollbackTo */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ }; #endif /* SQLITE_OMIT_VIRTUALTABLE */ diff --git a/ext/misc/completion.c b/ext/misc/completion.c index 4a4b918a37..72ad23df93 100644 --- a/ext/misc/completion.c +++ b/ext/misc/completion.c @@ -468,7 +468,8 @@ static sqlite3_module completionModule = { 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ - 0 /* xRollbackTo */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ }; #endif /* SQLITE_OMIT_VIRTUALTABLE */ diff --git a/ext/misc/explain.c b/ext/misc/explain.c index b228440f58..dc0c9d7669 100644 --- a/ext/misc/explain.c +++ b/ext/misc/explain.c @@ -280,6 +280,7 @@ static sqlite3_module explainModule = { 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + 0, /* xShadowName */ }; #endif /* SQLITE_OMIT_VIRTUALTABLE */ diff --git a/ext/misc/fileio.c b/ext/misc/fileio.c index 816a353c6e..e3e22ea4b0 100644 --- a/ext/misc/fileio.c +++ b/ext/misc/fileio.c @@ -888,7 +888,8 @@ static int fsdirRegister(sqlite3 *db){ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ - 0 /* xRollbackTo */ + 0, /* xRollbackTo */ + 0, /* xShadowName */ }; int rc = sqlite3_create_module(db, "fsdir", &fsdirModule, 0); diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 85b1143f83..7cff3d28d8 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -2388,7 +2388,8 @@ static sqlite3_module jsonEachModule = { 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ - 0 /* xRollbackTo */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ }; /* The methods of the json_tree virtual table. */ @@ -2415,7 +2416,8 @@ static sqlite3_module jsonTreeModule = { 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ - 0 /* xRollbackTo */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ }; #endif /* SQLITE_OMIT_VIRTUALTABLE */ diff --git a/ext/misc/memstat.c b/ext/misc/memstat.c index 3194e752cc..dcd5742fd2 100644 --- a/ext/misc/memstat.c +++ b/ext/misc/memstat.c @@ -395,6 +395,7 @@ static sqlite3_module memstatModule = { 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + 0, /* xShadowName */ }; #endif /* SQLITE_OMIT_VIRTUALTABLE */ diff --git a/ext/misc/stmt.c b/ext/misc/stmt.c index dbaa0bd64d..d2b33e7416 100644 --- a/ext/misc/stmt.c +++ b/ext/misc/stmt.c @@ -266,6 +266,7 @@ static sqlite3_module stmtModule = { 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + 0, /* xShadowName */ }; #endif /* SQLITE_OMIT_VIRTUALTABLE */ diff --git a/ext/misc/templatevtab.c b/ext/misc/templatevtab.c index 95b5f60cab..d7efa2b40e 100644 --- a/ext/misc/templatevtab.c +++ b/ext/misc/templatevtab.c @@ -248,7 +248,8 @@ static sqlite3_module templatevtabModule = { /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ 0, - /* xRollbackTo */ 0 + /* xRollbackTo */ 0, + /* xShadowName */ 0 }; diff --git a/ext/misc/unionvtab.c b/ext/misc/unionvtab.c index 94a5c8f013..2d2053ce9a 100644 --- a/ext/misc/unionvtab.c +++ b/ext/misc/unionvtab.c @@ -1350,7 +1350,8 @@ static int createUnionVtab(sqlite3 *db){ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ - 0 /* xRollbackTo */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ }; int rc; diff --git a/ext/misc/vtablog.c b/ext/misc/vtablog.c index 9e03fd455d..424b3457ff 100644 --- a/ext/misc/vtablog.c +++ b/ext/misc/vtablog.c @@ -492,6 +492,7 @@ static sqlite3_module vtablogModule = { 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + 0, /* xShadowName */ }; #ifdef _WIN32 diff --git a/ext/rbu/rbu1.test b/ext/rbu/rbu1.test index 1d16c1cd0a..7ec075b7e0 100644 --- a/ext/rbu/rbu1.test +++ b/ext/rbu/rbu1.test @@ -670,4 +670,3 @@ foreach {tn3 create_vfs destroy_vfs} { finish_test - diff --git a/ext/rbu/rbu10.test b/ext/rbu/rbu10.test index 4b398b6ab3..a7c63cf6db 100644 --- a/ext/rbu/rbu10.test +++ b/ext/rbu/rbu10.test @@ -185,4 +185,3 @@ do_test 4.3 { finish_test - diff --git a/ext/rbu/rbu11.test b/ext/rbu/rbu11.test index fdc701aceb..5a4219b001 100644 --- a/ext/rbu/rbu11.test +++ b/ext/rbu/rbu11.test @@ -195,4 +195,3 @@ do_test 4.7.2 { } {1 {SQLITE_ERROR - rbu_state mismatch error}} finish_test - diff --git a/ext/rbu/rbu12.test b/ext/rbu/rbu12.test index a83d0891a3..7816bfe89f 100644 --- a/ext/rbu/rbu12.test +++ b/ext/rbu/rbu12.test @@ -232,4 +232,3 @@ do_multiclient_test tn { } finish_test - diff --git a/ext/rbu/rbu13.test b/ext/rbu/rbu13.test index ad67a98f80..624c587cc3 100644 --- a/ext/rbu/rbu13.test +++ b/ext/rbu/rbu13.test @@ -62,4 +62,3 @@ do_execsql_test 1.4 { finish_test - diff --git a/ext/rbu/rbu14.test b/ext/rbu/rbu14.test index d4f97ac32c..07f6784094 100644 --- a/ext/rbu/rbu14.test +++ b/ext/rbu/rbu14.test @@ -92,4 +92,3 @@ foreach {tn schema} { finish_test - diff --git a/ext/rbu/rbu3.test b/ext/rbu/rbu3.test index 995b3123fd..da87561fbb 100644 --- a/ext/rbu/rbu3.test +++ b/ext/rbu/rbu3.test @@ -203,5 +203,3 @@ do_test 5.3 { do_test 6.1 { sqlite3rbu_internal_test } {} finish_test - - diff --git a/ext/rbu/rbu5.test b/ext/rbu/rbu5.test index 8e4ae8cb69..3696dfb874 100644 --- a/ext/rbu/rbu5.test +++ b/ext/rbu/rbu5.test @@ -300,7 +300,3 @@ foreach {tn idx} { finish_test - - - - diff --git a/ext/rbu/rbu6.test b/ext/rbu/rbu6.test index f05721574a..bb5b17f425 100644 --- a/ext/rbu/rbu6.test +++ b/ext/rbu/rbu6.test @@ -100,4 +100,3 @@ for {set nStep 8} {$nStep < 20} {incr nStep} { finish_test - diff --git a/ext/rbu/rbu7.test b/ext/rbu/rbu7.test index f773c9e5a9..1e3bc174dd 100644 --- a/ext/rbu/rbu7.test +++ b/ext/rbu/rbu7.test @@ -106,5 +106,3 @@ foreach {tn tbl} { } finish_test - - diff --git a/ext/rbu/rbu8.test b/ext/rbu/rbu8.test index 75edd4efba..c0ccd8c5eb 100644 --- a/ext/rbu/rbu8.test +++ b/ext/rbu/rbu8.test @@ -72,4 +72,3 @@ integrity_check 1.3.3 finish_test - diff --git a/ext/rbu/rbu9.test b/ext/rbu/rbu9.test index 3ce649d250..0efdc1dde5 100644 --- a/ext/rbu/rbu9.test +++ b/ext/rbu/rbu9.test @@ -125,4 +125,3 @@ foreach {tn idx} { finish_test - diff --git a/ext/rbu/rbuA.test b/ext/rbu/rbuA.test index 286194c4fc..642caca196 100644 --- a/ext/rbu/rbuA.test +++ b/ext/rbu/rbuA.test @@ -80,4 +80,3 @@ do_test 2.2 { finish_test - diff --git a/ext/rbu/rbuB.test b/ext/rbu/rbuB.test index c007fb7d9a..ece51c39b2 100644 --- a/ext/rbu/rbuB.test +++ b/ext/rbu/rbuB.test @@ -59,4 +59,3 @@ sqlite3_shutdown test_sqlite3_log sqlite3_initialize finish_test - diff --git a/ext/rbu/rbuC.test b/ext/rbu/rbuC.test index 89fd01518f..ff3d4d5075 100644 --- a/ext/rbu/rbuC.test +++ b/ext/rbu/rbuC.test @@ -139,4 +139,3 @@ foreach {tn schema} { finish_test - diff --git a/ext/rbu/rbucollate.test b/ext/rbu/rbucollate.test index 3b3b022a5b..ccc0976247 100644 --- a/ext/rbu/rbucollate.test +++ b/ext/rbu/rbucollate.test @@ -60,4 +60,3 @@ do_test 1.2 { #forcedelete testrbu.db finish_test - diff --git a/ext/rbu/rbucrash.test b/ext/rbu/rbucrash.test index f42218105b..34ac2c86fe 100644 --- a/ext/rbu/rbucrash.test +++ b/ext/rbu/rbucrash.test @@ -145,4 +145,3 @@ for {set nPre 0} {$nPre < $rbu_num_steps} {incr nPre} { } finish_test - diff --git a/ext/rbu/rbucrash2.test b/ext/rbu/rbucrash2.test index 5f2ba604d1..9ff6eba4f2 100644 --- a/ext/rbu/rbucrash2.test +++ b/ext/rbu/rbucrash2.test @@ -103,4 +103,3 @@ for {set x 1} {$x < 2} {incr x} { } finish_test - diff --git a/ext/rbu/rbudiff.test b/ext/rbu/rbudiff.test index 6f6af82804..965ce297e3 100644 --- a/ext/rbu/rbudiff.test +++ b/ext/rbu/rbudiff.test @@ -300,4 +300,3 @@ tablE t1 USING FTs5(c); finish_test - diff --git a/ext/rbu/rbudor.test b/ext/rbu/rbudor.test index dcee7ac381..df4d934de7 100644 --- a/ext/rbu/rbudor.test +++ b/ext/rbu/rbudor.test @@ -56,4 +56,3 @@ do_execsql_test 1.4 { } [list 1 $bigA 2 $bigB] finish_test - diff --git a/ext/rbu/rbufault.test b/ext/rbu/rbufault.test index 3e78b6e09e..247a991899 100644 --- a/ext/rbu/rbufault.test +++ b/ext/rbu/rbufault.test @@ -234,4 +234,3 @@ foreach {tn2 setup sql expect} { } finish_test - diff --git a/ext/rbu/rbufault2.test b/ext/rbu/rbufault2.test index ec89397fdc..5b006f78ea 100644 --- a/ext/rbu/rbufault2.test +++ b/ext/rbu/rbufault2.test @@ -55,4 +55,3 @@ do_faultsim_test 1 -faults oom* -prep { finish_test - diff --git a/ext/rbu/rbufault3.test b/ext/rbu/rbufault3.test index 4fd202d0b7..5d44885e9e 100644 --- a/ext/rbu/rbufault3.test +++ b/ext/rbu/rbufault3.test @@ -95,4 +95,3 @@ foreach {fault errlist} { } finish_test - diff --git a/ext/rbu/rbufault4.test b/ext/rbu/rbufault4.test index fe6cc90dc9..551b8b2b6f 100644 --- a/ext/rbu/rbufault4.test +++ b/ext/rbu/rbufault4.test @@ -63,4 +63,3 @@ for {set tn 1} {1} {incr tn} { finish_test - diff --git a/ext/rbu/rbufts.test b/ext/rbu/rbufts.test index c2821a9555..95d4e75c52 100644 --- a/ext/rbu/rbufts.test +++ b/ext/rbu/rbufts.test @@ -131,4 +131,3 @@ do_test 3.3 { finish_test - diff --git a/ext/rbu/rbumulti.test b/ext/rbu/rbumulti.test index 59c6538c6c..5579a5f5bf 100644 --- a/ext/rbu/rbumulti.test +++ b/ext/rbu/rbumulti.test @@ -172,4 +172,3 @@ for {set i 0} {$i<=3} {incr i} { finish_test - diff --git a/ext/rbu/rbuprogress.test b/ext/rbu/rbuprogress.test index 078b3b0d30..db479e32e5 100644 --- a/ext/rbu/rbuprogress.test +++ b/ext/rbu/rbuprogress.test @@ -416,4 +416,3 @@ foreach {bReopen} { 0 1 } { finish_test - diff --git a/ext/rbu/rburesume.test b/ext/rbu/rburesume.test index d03894e135..a2cf9bc4ab 100644 --- a/ext/rbu/rburesume.test +++ b/ext/rbu/rburesume.test @@ -251,4 +251,3 @@ for {set n 1} {$n < 5000} {incr n} { } finish_test - diff --git a/ext/rbu/rbusave.test b/ext/rbu/rbusave.test index 1bb71a8e05..210d7b545a 100644 --- a/ext/rbu/rbusave.test +++ b/ext/rbu/rbusave.test @@ -102,4 +102,3 @@ do_execsql_test 1.5 { } {1 one 1 3 3 3 4 4 4 1 one 1 3 3 3 4 4 4} finish_test - diff --git a/ext/rbu/rbusplit.test b/ext/rbu/rbusplit.test index 678f388dcf..34fef38677 100644 --- a/ext/rbu/rbusplit.test +++ b/ext/rbu/rbusplit.test @@ -92,4 +92,3 @@ foreach {tn cmd} { } finish_test - diff --git a/ext/rbu/rbutemplimit.test b/ext/rbu/rbutemplimit.test index 274f870b73..9397b568df 100644 --- a/ext/rbu/rbutemplimit.test +++ b/ext/rbu/rbutemplimit.test @@ -126,4 +126,3 @@ do_test 1.6.1 { do_test 1.6.2 { info commands rbu } {} finish_test - diff --git a/ext/rbu/rbuvacuum.test b/ext/rbu/rbuvacuum.test index dba0ef37e0..1785f529b1 100644 --- a/ext/rbu/rbuvacuum.test +++ b/ext/rbu/rbuvacuum.test @@ -397,4 +397,3 @@ do_test 3.5 { catch { db close } finish_test - diff --git a/ext/rbu/rbuvacuum2.test b/ext/rbu/rbuvacuum2.test index 0a1fe3da94..4713580c70 100644 --- a/ext/rbu/rbuvacuum2.test +++ b/ext/rbu/rbuvacuum2.test @@ -232,4 +232,3 @@ do_test 6.3 { } {ok} finish_test - diff --git a/ext/repair/test/checkindex01.test b/ext/repair/test/checkindex01.test index 25930397d3..97973aee71 100644 --- a/ext/repair/test/checkindex01.test +++ b/ext/repair/test/checkindex01.test @@ -347,5 +347,3 @@ do_index_check_test 7.3 t7i3 { do_index_check_test 7.4 t7i4 { {} 1,1 {} 3,3 } - - diff --git a/ext/rtree/geopoly.c b/ext/rtree/geopoly.c index be582a3e1b..4ac3b0aa2f 100644 --- a/ext/rtree/geopoly.c +++ b/ext/rtree/geopoly.c @@ -1725,7 +1725,7 @@ static int geopolyFindFunction( static sqlite3_module geopolyModule = { - 2, /* iVersion */ + 3, /* iVersion */ geopolyCreate, /* xCreate - create a table */ geopolyConnect, /* xConnect - connect to an existing table */ geopolyBestIndex, /* xBestIndex - Determine search strategy */ @@ -1748,6 +1748,7 @@ static sqlite3_module geopolyModule = { rtreeSavepoint, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + rtreeShadowName /* xShadowName */ }; static int sqlite3_geopoly_init(sqlite3 *db){ diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c index c00648f6a2..4b044cb710 100644 --- a/ext/rtree/rtree.c +++ b/ext/rtree/rtree.c @@ -3325,8 +3325,24 @@ static int rtreeQueryStat1(sqlite3 *db, Rtree *pRtree){ return rc; } + +/* +** Return true if zName is the extension on one of the shadow tables used +** by this module. +*/ +static int rtreeShadowName(const char *zName){ + static const char *azName[] = { + "node", "parent", "rowid" + }; + unsigned int i; + for(i=0; iaModule, pTab->azModuleArg[0]); + if( pMod==0 ) return 0; + if( pMod->pModule->iVersion<3 ) return 0; + if( pMod->pModule->xShadowName==0 ) return 0; + return pMod->pModule->xShadowName(zTail+1); +} + /* ** This routine is called to report the final ")" that terminates ** a CREATE TABLE statement. @@ -1933,6 +1959,10 @@ void sqlite3EndTable( p = pParse->pNewTable; if( p==0 ) return; + if( pSelect==0 && isShadowTableName(db, p->zName) ){ + p->tabFlags |= TF_Shadow; + } + /* If the db->init.busy is 1 it means we are reading the SQL off the ** "sqlite_master" or "sqlite_temp_master" table on the disk. ** So do not write to the disk again. Extract the root page number diff --git a/src/dbpage.c b/src/dbpage.c index a73ea01bdb..4f46659018 100644 --- a/src/dbpage.c +++ b/src/dbpage.c @@ -407,6 +407,7 @@ int sqlite3DbpageRegister(sqlite3 *db){ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + 0 /* xShadowName */ }; return sqlite3_create_module(db, "sqlite_dbpage", &dbpage_module, 0); } diff --git a/src/dbstat.c b/src/dbstat.c index ca0d541013..a2c6fe0894 100644 --- a/src/dbstat.c +++ b/src/dbstat.c @@ -720,6 +720,7 @@ int sqlite3DbstatRegister(sqlite3 *db){ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ + 0 /* xShadowName */ }; return sqlite3_create_module(db, "dbstat", &dbstat_module, 0); } diff --git a/src/delete.c b/src/delete.c index fa49f66666..157e1a8de1 100644 --- a/src/delete.c +++ b/src/delete.c @@ -44,32 +44,47 @@ Table *sqlite3SrcListLookup(Parse *pParse, SrcList *pSrc){ return pTab; } +/* Return true if table pTab is read-only. +** +** A table is read-only if any of the following are true: +** +** 1) It is a virtual table and no implementation of the xUpdate method +** has been provided +** +** 2) It is a system table (i.e. sqlite_master), this call is not +** part of a nested parse and writable_schema pragma has not +** been specified +** +** 3) The table is a shadow table, the database connection is in +** defensive mode, and the current sqlite3_prepare() +** is for a top-level SQL statement. +*/ +static int tabIsReadOnly(Parse *pParse, Table *pTab){ + sqlite3 *db; + if( IsVirtual(pTab) ){ + return sqlite3GetVTable(pParse->db, pTab)->pMod->pModule->xUpdate==0; + } + if( (pTab->tabFlags & (TF_Readonly|TF_Shadow))==0 ) return 0; + db = pParse->db; + if( (pTab->tabFlags & TF_Readonly)!=0 ){ + return sqlite3WritableSchema(db)==0 && pParse->nested==0; + } + assert( pTab->tabFlags & TF_Shadow ); + return (db->flags & SQLITE_Defensive)!=0 + && db->nVdbeExec==0 + && db->pVtabCtx==0; +} + /* ** Check to make sure the given table is writable. If it is not ** writable, generate an error message and return 1. If it is ** writable return 0; */ int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){ - /* A table is not writable under the following circumstances: - ** - ** 1) It is a virtual table and no implementation of the xUpdate method - ** has been provided, or - ** 2) It is a system table (i.e. sqlite_master), this call is not - ** part of a nested parse and writable_schema pragma has not - ** been specified. - ** - ** In either case leave an error message in pParse and return non-zero. - */ - if( ( IsVirtual(pTab) - && sqlite3GetVTable(pParse->db, pTab)->pMod->pModule->xUpdate==0 ) - || ( (pTab->tabFlags & TF_Readonly)!=0 - && sqlite3WritableSchema(pParse->db)==0 - && pParse->nested==0) - ){ + if( tabIsReadOnly(pParse, pTab) ){ sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName); return 1; } - #ifndef SQLITE_OMIT_VIEW if( !viewOk && pTab->pSelect ){ sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName); diff --git a/src/main.c b/src/main.c index 01d8bca861..1e55983932 100644 --- a/src/main.c +++ b/src/main.c @@ -3062,6 +3062,9 @@ static int openDatabase( #endif #if defined(SQLITE_ENABLE_QPSG) | SQLITE_EnableQPSG +#endif +#if defined(SQLITE_DEFAULT_DEFENSIVE) + | SQLITE_Defensive #endif ; sqlite3HashInit(&db->aCollSeq); diff --git a/src/pragma.c b/src/pragma.c index 52d6338ca0..20656dc453 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -2477,7 +2477,8 @@ static const sqlite3_module pragmaVtabModule = { 0, /* xRename - rename the table */ 0, /* xSavepoint */ 0, /* xRelease */ - 0 /* xRollbackTo */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ }; /* diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 18593a6440..90d514bbd5 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -2160,27 +2160,16 @@ struct sqlite3_mem_methods { ** ensure that it does not happen by accident. ** **
SQLITE_DBCONFIG_DEFENSIVE
-**
The SQLITE_DBCONFIG_DEFENSIVE option actives or deactivates the +**
The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the ** "defensive" flag for a database connection. When the defensive -** flag is enabled, some obscure features of SQLite are disabled in order -** to reduce the attack surface. Applications that run untrusted SQL -** can activate this flag to reduce the risk of zero-day exploits. -**

-** Features disabled by the defensive flag include: +** flag is enabled, language features that allow ordinary SQL to +** deliberately corrupt the database file are disabled. The disabled +** features include but are not limited to the following: **

    -**
  • The [PRAGMA writable_schema=ON] statement. -**
  • Writes to the [sqlite_dbpage] virtual table. +**
  • The [PRAGMA writable_schema=ON] statement. +**
  • Writes to the [sqlite_dbpage] virtual table. +**
  • Direct writes to shadow tables. **
-** New restrictions may be added in future releases. -**

-** To be clear: It should never be possible for hostile SQL to cause -** arbitrary memory reads, memory leaks, buffer overflows, assertion -** faults, arbitrary code execution, crashes, or other mischief, regardless -** of the value of the defensive flag. Any occurrance of these problems -** is considered a serious bug and will be fixed promptly. It is not -** necessary to enable the defensive flag in order to make SQLite secure -** against attack. The defensive flag merely provides an additional layer -** of defense against unknown vulnerabilities. **

** */ @@ -6322,6 +6311,9 @@ struct sqlite3_module { int (*xSavepoint)(sqlite3_vtab *pVTab, int); int (*xRelease)(sqlite3_vtab *pVTab, int); int (*xRollbackTo)(sqlite3_vtab *pVTab, int); + /* The methods above are in versions 1 and 2 of the sqlite_module object. + ** Those below are for version 3 and greater. */ + int (*xShadowName)(const char*); }; /* diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 42fc640cc4..d0e4b7385f 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2001,6 +2001,7 @@ struct Table { #define TF_StatsUsed 0x0100 /* Query planner decisions affected by ** Index.aiRowLogEst[] values */ #define TF_HasNotNull 0x0200 /* Contains NOT NULL constraints */ +#define TF_Shadow 0x0400 /* True for a shadow table */ /* ** Test to see whether or not a table is a virtual table. This is diff --git a/src/vacuum.c b/src/vacuum.c index 04ad5e7a3a..5fb048916b 100644 --- a/src/vacuum.c +++ b/src/vacuum.c @@ -166,7 +166,8 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db, int iDb){ saved_mTrace = db->mTrace; db->flags |= SQLITE_WriteSchema | SQLITE_IgnoreChecks; db->mDbFlags |= DBFLAG_PreferBuiltin | DBFLAG_Vacuum; - db->flags &= ~(SQLITE_ForeignKeys | SQLITE_ReverseOrder | SQLITE_CountRows); + db->flags &= ~(SQLITE_ForeignKeys | SQLITE_ReverseOrder + | SQLITE_Defensive | SQLITE_CountRows); db->mTrace = 0; zDbMain = db->aDb[iDb].zDbSName; diff --git a/test/alter2.test b/test/alter2.test index 14be637f97..aae0061ad4 100644 --- a/test/alter2.test +++ b/test/alter2.test @@ -64,6 +64,7 @@ proc alter_table {tbl sql {file_format 2}} { sqlite3 dbat test.db set s [string map {' ''} $sql] set t [string map {' ''} $tbl] + sqlite3_db_config dbat DEFENSIVE 0 dbat eval [subst { PRAGMA writable_schema = 1; UPDATE sqlite_master SET sql = '$s' WHERE name = '$t' AND type = 'table'; @@ -91,6 +92,7 @@ do_test alter2-1.0 { #----------------------------------------------------------------------- # Some basic tests to make sure short rows are handled. # +sqlite3_db_config db DEFENSIVE 0 do_test alter2-1.1 { execsql { CREATE TABLE abc(a, b); diff --git a/test/altercol.test b/test/altercol.test index 39b0b15776..d8a14b2037 100644 --- a/test/altercol.test +++ b/test/altercol.test @@ -553,6 +553,7 @@ do_execsql_test 13.1.3 { SELECT sql FROM sqlite_master WHERE name='x1i'; } {{CREATE INDEX x1i ON x1(i)}} +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 13.1.4 { PRAGMA writable_schema = 1; UPDATE sqlite_master SET sql = 'CREATE INDEX x1i ON x1(j)' WHERE name='x1i'; diff --git a/test/alterlegacy.test b/test/alterlegacy.test index 9f7777670d..47d8bcfba9 100644 --- a/test/alterlegacy.test +++ b/test/alterlegacy.test @@ -467,4 +467,3 @@ do_execsql_test 14.6 { finish_test - diff --git a/test/altertab.test b/test/altertab.test index 819aa67201..5f2b746c19 100644 --- a/test/altertab.test +++ b/test/altertab.test @@ -505,4 +505,3 @@ do_execsql_test 15.5 { finish_test - diff --git a/test/altertab2.test b/test/altertab2.test index 2b2a0fb1e0..2e4212c35e 100644 --- a/test/altertab2.test +++ b/test/altertab2.test @@ -87,4 +87,3 @@ do_execsql_test 2.3 { finish_test - diff --git a/test/analyze.test b/test/analyze.test index f3293b2917..683542f127 100644 --- a/test/analyze.test +++ b/test/analyze.test @@ -350,6 +350,7 @@ ifcapable stat4||stat3 { # in the series. # do_test analyze-5.99 { + sqlite3_db_config db DEFENSIVE 0 execsql { PRAGMA writable_schema=on; UPDATE sqlite_master SET sql='nonsense' WHERE name='sqlite_stat1'; diff --git a/test/autoinc.test b/test/autoinc.test index 75b16daa10..bc757319f8 100644 --- a/test/autoinc.test +++ b/test/autoinc.test @@ -697,6 +697,7 @@ do_test autoinc-12.1 { db close forcedelete test.db sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 db eval { CREATE TABLE fake_sequence(name TEXT PRIMARY KEY,seq) WITHOUT ROWID; PRAGMA writable_schema=on; @@ -718,6 +719,7 @@ do_test autoinc-12.2 { db close forcedelete test.db sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 db eval { CREATE TABLE t1(a INTEGER PRIMARY KEY AUTOINCREMENT, b TEXT); INSERT INTO t1(b) VALUES('one'); @@ -744,6 +746,7 @@ do_test autoinc-12.3 { db close forcedelete test.db sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 db eval { CREATE TABLE t1(a INTEGER PRIMARY KEY AUTOINCREMENT, b TEXT); INSERT INTO t1(b) VALUES('one'); @@ -772,6 +775,7 @@ do_test autoinc-12.4 { WHERE name='sqlite_sequence'}] set root2 [db one {SELECT rootpage FROM sqlite_master WHERE name='fake'}] + sqlite3_db_config db DEFENSIVE 0 db eval { PRAGMA writable_schema=on; UPDATE sqlite_master SET rootpage=$root2 @@ -791,6 +795,7 @@ do_test autoinc-12.5 { db close forcedelete test.db sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 db eval { CREATE TABLE t1(a INTEGER PRIMARY KEY AUTOINCREMENT, b TEXT); INSERT INTO t1(b) VALUES('one'); @@ -810,6 +815,7 @@ do_test autoinc-12.6 { db close forcedelete test.db sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 db eval { CREATE TABLE t1(a INTEGER PRIMARY KEY AUTOINCREMENT, b TEXT); INSERT INTO t1(b) VALUES('one'); @@ -831,6 +837,7 @@ do_test autoinc-12.7 { db close forcedelete test.db sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 db eval { CREATE TABLE t1(a INTEGER PRIMARY KEY AUTOINCREMENT, b TEXT); INSERT INTO t1(b) VALUES('one'); diff --git a/test/bestindex5.test b/test/bestindex5.test index ea93a47662..f7334653dc 100644 --- a/test/bestindex5.test +++ b/test/bestindex5.test @@ -247,4 +247,3 @@ do_execsql_test 3.5 { SELECT rowid, * FROM t4 WHERE rowid!=1 OR x!='245'; } {} finish_test - diff --git a/test/capi3.test b/test/capi3.test index 4950ef245e..40d87ac8e3 100644 --- a/test/capi3.test +++ b/test/capi3.test @@ -741,6 +741,7 @@ if {![sqlite3 -has-codec]} { } {} do_test capi3-8.2 { sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 execsql { PRAGMA writable_schema=ON; INSERT INTO sqlite_master VALUES(NULL,NULL,NULL,NULL,NULL); @@ -759,6 +760,7 @@ if {![sqlite3 -has-codec]} { db close forcedelete test.db test.db-journal sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 execsql { CREATE TABLE t1(a); PRAGMA writable_schema=ON; diff --git a/test/capi3c.test b/test/capi3c.test index c275242459..889ecbe859 100644 --- a/test/capi3c.test +++ b/test/capi3c.test @@ -686,6 +686,7 @@ if {![sqlite3 -has-codec]} { } {} do_test capi3c-8.2 { sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 execsql { PRAGMA writable_schema=ON; INSERT INTO sqlite_master VALUES(NULL,NULL,NULL,NULL,NULL); @@ -704,6 +705,7 @@ if {![sqlite3 -has-codec]} { db close forcedelete test.db test.db-journal sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 execsql { CREATE TABLE t1(a); PRAGMA writable_schema=ON; diff --git a/test/corrupt.test b/test/corrupt.test index 3e49a9ff18..62ead4d9a7 100644 --- a/test/corrupt.test +++ b/test/corrupt.test @@ -132,6 +132,7 @@ do_test corrupt-3.2 { set t1_r [execsql {SELECT rootpage FROM sqlite_master WHERE name = 't1i1'}] set t1i1_r [execsql {SELECT rootpage FROM sqlite_master WHERE name = 't1'}] set cookie [expr [execsql {PRAGMA schema_version}] + 1] + sqlite3_db_config db DEFENSIVE 0 execsql " PRAGMA writable_schema = 1; UPDATE sqlite_master SET rootpage = $t1_r WHERE name = 't1'; diff --git a/test/corrupt2.test b/test/corrupt2.test index 9512d0f242..eee7ed322c 100644 --- a/test/corrupt2.test +++ b/test/corrupt2.test @@ -133,6 +133,7 @@ do_test corrupt2-2.1 { forcecopy test.db corrupt.db sqlite3 db2 corrupt.db + sqlite3_db_config db2 DEFENSIVE 0 execsql " $::presql CREATE INDEX a1 ON abc(a); @@ -265,6 +266,7 @@ proc corruption_test {args} { forcedelete corrupt.db-journal sqlite3 db corrupt.db + sqlite3_db_config db DEFENSIVE 0 db eval $::presql eval $A(-tclprep) db eval $A(-sqlprep) diff --git a/test/corrupt5.test b/test/corrupt5.test index 3f5099630e..75097668c7 100644 --- a/test/corrupt5.test +++ b/test/corrupt5.test @@ -33,6 +33,7 @@ ifcapable !pager_pragmas { # Create a database with a freelist containing at least two pages. # do_test corrupt5-1.1 { + sqlite3_db_config db DEFENSIVE 0 execsql { CREATE TABLE t1(a,b,c); CREATE INDEX i1 ON t1(a,b); diff --git a/test/corruptI.test b/test/corruptI.test index cdcb94201e..12ce446540 100644 --- a/test/corruptI.test +++ b/test/corruptI.test @@ -222,6 +222,7 @@ do_execsql_test 7.0 { INSERT INTO t1 VALUES('c', 'A'); SELECT name FROM sqlite_master; } {t1 sqlite_autoindex_t1_1} +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 7.1 { PRAGMA writable_schema = 1; DELETE FROM sqlite_master WHERE name = 'sqlite_autoindex_t1_1'; diff --git a/test/corruptK.test b/test/corruptK.test index 1694db1747..ad5b9a4718 100644 --- a/test/corruptK.test +++ b/test/corruptK.test @@ -143,7 +143,7 @@ if {[permutation]!="inmemory_journal"} { CREATE TABLE t4(a, b, c); CREATE TABLE t5(a, b, c); } - + sqlite3_db_config db DEFENSIVE 0 do_execsql_test 3.2 { UPDATE sqlite_dbpage SET data = hex2blob(' 000: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3. diff --git a/test/countofview.test b/test/countofview.test index aebd6ed8e5..5f892ee274 100644 --- a/test/countofview.test +++ b/test/countofview.test @@ -41,4 +41,3 @@ do_execsql_test 1.3 { } {3} finish_test - diff --git a/test/dbpage.test b/test/dbpage.test index 754bc17926..288af89310 100644 --- a/test/dbpage.test +++ b/test/dbpage.test @@ -21,6 +21,7 @@ ifcapable !vtab||!compound { return } +sqlite3_db_config db DEFENSIVE 0 do_test 100 { execsql { PRAGMA auto_vacuum=0; diff --git a/test/default.test b/test/default.test index 406eb53677..d691303485 100644 --- a/test/default.test +++ b/test/default.test @@ -106,6 +106,7 @@ do_execsql_test default-3.3 { db close forcedelete test.db sqlite3 db test.db +sqlite3_db_config db DEFENSIVE 0 do_execsql_test default-4.0 { CREATE TABLE t1(a TEXT, b TEXT DEFAULT(99)); PRAGMA writable_schema=ON; diff --git a/test/e_fts3.test b/test/e_fts3.test index 22c3fdb157..c06feab2d1 100644 --- a/test/e_fts3.test +++ b/test/e_fts3.test @@ -677,6 +677,7 @@ write_test 10.1.2 ta_content { INSERT INTO ta VALUES('During a summer vacation in 1790') } write_test 10.1.3 ta_content { INSERT INTO ta VALUES('Wordsworth went on a walking tour') } +sqlite3_db_config db DEFENSIVE 0 write_test 10.1.4 ta_content { DELETE FROM ta_content WHERE rowid = 2 } read_test 10.1.5 { SELECT * FROM ta WHERE ta MATCH 'summer' diff --git a/test/e_reindex.test b/test/e_reindex.test index c6a9e0352f..00291b76a6 100644 --- a/test/e_reindex.test +++ b/test/e_reindex.test @@ -44,6 +44,7 @@ do_reindex_tests e_reindex-0.1 { # Test this by corrupting some database indexes, running REINDEX, and # observing that the corruption is gone. # +sqlite3_db_config db DEFENSIVE 0 do_execsql_test e_reindex-1.1 { INSERT INTO t1 VALUES(1, 2); INSERT INTO t1 VALUES(3, 4); @@ -57,6 +58,7 @@ do_execsql_test e_reindex-1.1 { db close sqlite3 db test.db +sqlite3_db_config db DEFENSIVE 0 do_execsql_test e_reindex-1.2 { DELETE FROM t1 WHERE a = 3; INSERT INTO t1 VALUES(7, 8); diff --git a/test/fts3auto.test b/test/fts3auto.test index 20640d29ac..4abf06ff98 100644 --- a/test/fts3auto.test +++ b/test/fts3auto.test @@ -134,6 +134,7 @@ proc fts3_make_deferrable {tbl token {nRow 0}} { # fts3_zero_long_segments TABLE ?LIMIT? # proc fts3_zero_long_segments {tbl limit} { + sqlite3_db_config db DEFENSIVE 0 execsql " UPDATE ${tbl}_segments SET block = zeroblob(length(block)) diff --git a/test/fts3corrupt.test b/test/fts3corrupt.test index cb50e3e46a..664b1393b8 100644 --- a/test/fts3corrupt.test +++ b/test/fts3corrupt.test @@ -23,6 +23,7 @@ set ::testprefix fts3corrupt # extends past the end of the node on which it resides is correctly identified # as database corruption. # +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.0 { CREATE VIRTUAL TABLE t1 USING fts3; INSERT INTO t1 VALUES('hello'); diff --git a/test/fts3corrupt2.test b/test/fts3corrupt2.test index 78c76778f5..40783facf9 100644 --- a/test/fts3corrupt2.test +++ b/test/fts3corrupt2.test @@ -49,6 +49,7 @@ lappend data {*}{ "acvmldguld asdvz aqb aeomsyzyu aggylhprbdz asrfkwz auipybpsn agsnszzfb" } +sqlite3_db_config db DEFENSIVE 0 do_test fts3corrupt2-1.0 { execsql BEGIN execsql { CREATE VIRTUAL TABLE t2 USING FTS3(a, b); } diff --git a/test/fts3corrupt3.test b/test/fts3corrupt3.test index 6c846e9bae..eae13f222b 100644 --- a/test/fts3corrupt3.test +++ b/test/fts3corrupt3.test @@ -33,6 +33,7 @@ do_execsql_test 1.0 { do_execsql_test 1.1 { SELECT quote(root) from t1_segdir; } {X'00036F6E6509010200010200010200'} +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.2 { UPDATE t1_segdir SET root = X'00036F6E650EFFFFFFFFFFFFFFFFFFFFFFFF0200'; } diff --git a/test/fts3corrupt4.test b/test/fts3corrupt4.test index 52c3d8caf4..5e9e458134 100644 --- a/test/fts3corrupt4.test +++ b/test/fts3corrupt4.test @@ -40,6 +40,7 @@ do_execsql_test 1.1 { SELECT quote(root) FROM ft_segdir; } {X'0005616261636B03010200030266740302020003046E646F6E03030200'} +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.2 { UPDATE ft_segdir SET root = blob( '0005616261636B03010200 FFFFFFFF0702 66740302020003046E646F6E03030200' @@ -83,6 +84,7 @@ do_execsql_test 2.2 { } {X'00056162633130031F0200'} db func blob blob +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 2.3.1 { UPDATE ft_segments SET block = blob('00056162633130031F0200 FFFFFFFF07FF55 66740302020003046E646F6E03030200') @@ -133,6 +135,7 @@ do_execsql_test 3.1 { } {X'0101056162633132040136030132030136'} db func blob blob +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 3.2 { UPDATE ft_segdir SET root = blob('0101056162633132FFFFFFFF070236030132030136'); @@ -143,5 +146,3 @@ do_catchsql_test 3.1 { } {1 {database disk image is malformed}} finish_test - - diff --git a/test/fts3cov.test b/test/fts3cov.test index 817679d0a4..95269a6b0b 100644 --- a/test/fts3cov.test +++ b/test/fts3cov.test @@ -89,6 +89,7 @@ do_test fts3cov-2.1 { } {03} # Test the "missing entry" case: +sqlite3_db_config db DEFENSIVE 0 do_test fts3cov-2.2 { set root [db one {SELECT root FROM t1_segdir}] read_fts3varint [string range $root 1 end] left_child @@ -405,6 +406,7 @@ do_execsql_test 15.1 { # Test a corruption case. # +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 16.1 { CREATE VIRTUAL TABLE t16 USING fts4; INSERT INTO t16 VALUES('theoretical work to examine the relationship'); diff --git a/test/fts3d.test b/test/fts3d.test index 83af4d2a37..b0547ce7ab 100644 --- a/test/fts3d.test +++ b/test/fts3d.test @@ -296,6 +296,7 @@ do_test fts3d-5.0 { } {{Index already optimal} 1 0} # Even if we move things around, still does nothing. +sqlite3_db_config db DEFENSIVE 0 do_test fts3d-5.1 { execsql { UPDATE t1_segdir SET level = 2 WHERE level = 1 AND idx = 0; diff --git a/test/fts3defer.test b/test/fts3defer.test index 532d4dfa6a..5d8395afc1 100644 --- a/test/fts3defer.test +++ b/test/fts3defer.test @@ -59,6 +59,7 @@ set tests { do_select_tests 1.2 $tests +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.3 { SELECT count(*) FROM t1_segments WHERE length(block)>10000; UPDATE t1_segments @@ -225,6 +226,7 @@ foreach {tn setup} { execsql { CREATE VIRTUAL TABLE t1 USING FTS4 } foreach doc $data { execsql { INSERT INTO t1 VALUES($doc) } } add_empty_records 1000 + sqlite3_db_config db DEFENSIVE 0 execsql $zero_long_doclists } 4 { @@ -233,6 +235,7 @@ foreach {tn setup} { foreach doc $data { execsql { INSERT INTO t1 VALUES($doc) } } add_empty_records 1000 execsql "INSERT INTO t1(t1) VALUES('optimize')" + sqlite3_db_config db DEFENSIVE 0 execsql $zero_long_doclists } 5 { @@ -240,6 +243,7 @@ foreach {tn setup} { execsql { CREATE VIRTUAL TABLE t1 USING FTS4(matchinfo=fts3) } foreach doc $data { execsql { INSERT INTO t1 VALUES($doc) } } add_empty_records 1000 + sqlite3_db_config db DEFENSIVE 0 execsql $zero_long_doclists } } { diff --git a/test/fts3defer2.test b/test/fts3defer2.test index 275e0f0eb3..46b62b9017 100644 --- a/test/fts3defer2.test +++ b/test/fts3defer2.test @@ -46,6 +46,7 @@ do_execsql_test 1.1.4 { INSERT INTO t1 VALUES(''); INSERT INTO t1(t1) VALUES('optimize'); } +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.1.4 { SELECT count(*) FROM t1_segments WHERE length(block)>10000; UPDATE t1_segments SET block = zeroblob(length(block)) WHERE length(block)>10000; @@ -98,6 +99,7 @@ foreach {tn sql} { WHERE length(block)>10000; } } { + sqlite3_db_config db DEFENSIVE 0 execsql $sql do_execsql_test 2.2.$tn.1 { @@ -152,6 +154,7 @@ foreach {tn sql} { WHERE length(block)>10000; } } { + sqlite3_db_config db DEFENSIVE 0 execsql $sql do_execsql_test 2.4.$tn { SELECT docid, mit(matchinfo(t3, 'pcxnal')) FROM t3 WHERE t3 MATCH '"a b c"'; diff --git a/test/fts3matchinfo.test b/test/fts3matchinfo.test index 8cbcd69041..af0b1cdc0d 100644 --- a/test/fts3matchinfo.test +++ b/test/fts3matchinfo.test @@ -278,6 +278,7 @@ do_matchinfo_test 4.3.6 t5 {t5 MATCH 'a OR b'} { s {1 2 1 1} } do_execsql_test 4.4.0.1 { INSERT INTO t5(t5) VALUES('optimize') } ifcapable fts4_deferred { + sqlite3_db_config db DEFENSIVE 0 do_execsql_test 4.4.0.2 { UPDATE t5_segments SET block = zeroblob(length(block)) @@ -339,6 +340,7 @@ do_execsql_test 6.1 { SELECT offsets(t9) FROM t9 WHERE t9 MATCH 'to'; } {{0 0 20 2 0 0 27 2}} +sqlite3_db_config db DEFENSIVE 0 do_catchsql_test 6.2 { UPDATE t9_content SET c0content = 'this record is used to'; SELECT offsets(t9) FROM t9 WHERE t9 MATCH 'to'; @@ -392,6 +394,7 @@ do_execsql_test 8.3 { } {{204 1 3 3 0} {204 1 3 3 0} {204 1 3 3 0}} # Corruption related tests. +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 8.4.1.1 { UPDATE t11_stat SET value = X'0000'; } do_catchsql_test 8.5.1.2 { SELECT mit(matchinfo(t11, 'nxa')) FROM t11 WHERE t11 MATCH 'a*' diff --git a/test/fts3misc.test b/test/fts3misc.test index 80204726c2..60126dd6b4 100644 --- a/test/fts3misc.test +++ b/test/fts3misc.test @@ -160,6 +160,7 @@ ifcapable fts4_deferred { do_execsql_test 4.2 { SELECT quote(value) from t4_stat where id=0 } {X'C03EC0B204C0A608'} + sqlite3_db_config db DEFENSIVE 0 do_execsql_test 4.3 { UPDATE t4_stat SET value = X'C03EC0B204C0A60800' WHERE id=0; } diff --git a/test/fts3query.test b/test/fts3query.test index bc25699e12..ca3ee6695a 100644 --- a/test/fts3query.test +++ b/test/fts3query.test @@ -167,6 +167,7 @@ do_select_tests 5.3 -errorformat { 3 "SELECT snippet(content) FROM t2 WHERE t2 MATCH 'history'" snippet 4 "SELECT optimize(content) FROM t2 WHERE t2 MATCH 'history'" optimize } +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 5.4.0 { UPDATE t2_content SET c0content = X'1234' } do_select_tests 5.4 -errorformat { illegal first argument to %s diff --git a/test/fts3snippet.test b/test/fts3snippet.test index 887011cd11..4a0b7873d5 100644 --- a/test/fts3snippet.test +++ b/test/fts3snippet.test @@ -184,6 +184,7 @@ foreach {DO_MALLOC_TEST enc} { [list 0 0 $off 10 1 0 $off 10] [list 0 0 $off 10] # Test a corruption case: + sqlite3_db_config db DEFENSIVE 0 execsql { UPDATE ft_content SET c1b = 'hello world' WHERE c1b = $numbers } do_error_test $T.2.3 { SELECT offsets(ft) FROM ft WHERE ft MATCH 'onehundred' diff --git a/test/fts4check.test b/test/fts4check.test index 1e2f6b234f..c94c35910b 100644 --- a/test/fts4check.test +++ b/test/fts4check.test @@ -66,6 +66,7 @@ foreach {tn disruption} { ); } } { + sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.2.1.$tn "BEGIN; $disruption" do_catchsql_test 1.2.2.$tn { INSERT INTO t1 (t1) VALUES('integrity-check') @@ -100,6 +101,7 @@ foreach {tn disruption} { ); } } { + sqlite3_db_config db DEFENSIVE 0 do_execsql_test 2.2.1.$tn "BEGIN; $disruption" do_catchsql_test 2.2.2.$tn { INSERT INTO t2 (t2) VALUES('integrity-check') @@ -145,6 +147,7 @@ foreach {tn disruption} { ) } } { + sqlite3_db_config db DEFENSIVE 0 do_execsql_test 3.2.1.$tn "BEGIN; $disruption" do_catchsql_test 3.2.2.$tn { INSERT INTO t3 (t3) VALUES('integrity-check') @@ -163,6 +166,7 @@ do_execsql_test 4.0 { INSERT INTO t4(t4) VALUES('integrity-check'); } +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 4.1 { PRAGMA writable_schema = 1; UPDATE sqlite_master @@ -197,6 +201,7 @@ do_execsql_test 5.1 { INSERT INTO t5(t5) VALUES('integrity-check'); } {} +sqlite3_db_config db DEFENSIVE 0 do_catchsql_test 5.2 { INSERT INTO t5_content VALUES(5, 'his hardy mountain pony'); INSERT INTO t5(t5) VALUES('integrity-check'); diff --git a/test/fts4growth.test b/test/fts4growth.test index 4dc2212464..5cf877747b 100644 --- a/test/fts4growth.test +++ b/test/fts4growth.test @@ -25,6 +25,7 @@ ifcapable !fts3 { source $testdir/genesis.tcl +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 1.1 { CREATE VIRTUAL TABLE x1 USING fts3; } do_test 1.2 { diff --git a/test/fts4merge.test b/test/fts4merge.test index 63272c41b9..48661afd71 100644 --- a/test/fts4merge.test +++ b/test/fts4merge.test @@ -156,6 +156,7 @@ foreach mod {fts3 fts4} { SELECT quote(value) FROM t4_stat WHERE rowid=1 } {X'0006'} + sqlite3_db_config db DEFENSIVE 0 do_execsql_test 4.4.2 { DELETE FROM t4_stat WHERE rowid=1; INSERT INTO t4(t4) VALUES('merge=1,12'); diff --git a/test/fts4opt.test b/test/fts4opt.test index 0d0ed9f4f0..4b3d003239 100644 --- a/test/fts4opt.test +++ b/test/fts4opt.test @@ -37,6 +37,7 @@ fts_kjv_genesis # incremental optimize routine. # proc prepare_for_optimize {db tbl} { + sqlite3_db_config $db DEFENSIVE 0 $db eval [string map [list % $tbl] { BEGIN; CREATE TEMP TABLE tmp_segdir( diff --git a/test/index.test b/test/index.test index 124b122e00..ae16470570 100644 --- a/test/index.test +++ b/test/index.test @@ -626,7 +626,6 @@ do_test index-18.1 { } } {1 {object name reserved for internal use: sqlite_t1}} do_test index-18.1.2 { - sqlite3_db_config db DEFENSIVE 1 catchsql { CREATE TABLE sqlite_t1(a, b, c); } diff --git a/test/index3.test b/test/index3.test index 4c00a852d2..6100f48573 100644 --- a/test/index3.test +++ b/test/index3.test @@ -83,6 +83,7 @@ do_execsql_test index3-2.5 { # in the series. # do_test index3-99.1 { + sqlite3_db_config db DEFENSIVE 0 execsql { PRAGMA writable_schema=on; UPDATE sqlite_master SET sql='nonsense' WHERE name='t1d' diff --git a/test/misc1.test b/test/misc1.test index 05b1b1980f..9ac52e4626 100644 --- a/test/misc1.test +++ b/test/misc1.test @@ -659,6 +659,7 @@ do_execsql_test misc1-22.1 { # db close sqlite3 db :memory: +sqlite3_db_config db DEFENSIVE 0 do_execsql_test misc1-23.1 { CREATE TABLE t1(x); PRAGMA writable_schema=ON; @@ -674,6 +675,7 @@ do_execsql_test misc1-23.1 { db close database_may_be_corrupt sqlite3 db :memory: +sqlite3_db_config db DEFENSIVE 0 do_catchsql_test misc1-23.2 { CREATE TABLE t1(x UNIQUE); PRAGMA writable_schema=ON; @@ -685,6 +687,7 @@ do_catchsql_test misc1-23.2 { } {1 {no such table: F}} db close sqlite3 db :memory: +sqlite3_db_config db DEFENSIVE 0 do_catchsql_test misc1-23.3 { CREATE TABLE t1(x UNIQUE); PRAGMA writable_schema=ON; diff --git a/test/misc4.test b/test/misc4.test index 79e756ec63..3d391882c3 100644 --- a/test/misc4.test +++ b/test/misc4.test @@ -212,6 +212,7 @@ do_test misc4-6.2 { # db close sqlite3 db :memory: +sqlite3_db_config db DEFENSIVE 0 do_catchsql_test misc4-7.1 { CREATE TABLE t7(x); PRAGMA writable_schema=ON; diff --git a/test/misc5.test b/test/misc5.test index 881aba1cd8..f7c6048d97 100644 --- a/test/misc5.test +++ b/test/misc5.test @@ -590,6 +590,7 @@ do_test misc5-7.1 { # do_test misc5-7.2 { sqlite3 db2 :memory: + sqlite3_db_config db2 DEFENSIVE 0 catchsql { CREATE TABLE t1(x UNIQUE); PRAGMA writable_schema=ON; diff --git a/test/misc7.test b/test/misc7.test index 93e107beb0..5ae8178da5 100644 --- a/test/misc7.test +++ b/test/misc7.test @@ -434,6 +434,7 @@ if {$tcl_platform(platform)!="windows"} { set ::pending_byte_page [expr ($::sqlite_pending_byte / 1024) + 1] sqlite3_test_control_pending_byte $::sqlite_pending_byte do_test misc7-17.3 { + sqlite3_db_config db DEFENSIVE 0 db eval { pragma writable_schema = true; UPDATE sqlite_master diff --git a/test/mjournal.test b/test/mjournal.test index 539ebc6946..7aaa86bae0 100644 --- a/test/mjournal.test +++ b/test/mjournal.test @@ -160,4 +160,3 @@ do_hasmj_test 2.3 { } {0} finish_test - diff --git a/test/notnull.test b/test/notnull.test index 32d95eaf24..23abe31f28 100644 --- a/test/notnull.test +++ b/test/notnull.test @@ -606,4 +606,3 @@ do_uses_op_next_test notnull-6.9 "SELECT * FROM t8 WHERE a IS ?" 0 do_uses_op_next_test notnull-6.10 "SELECT * FROM t8 WHERE a IS ?" 0 finish_test - diff --git a/test/pager1.test b/test/pager1.test index 1d56fad30b..8216b467ed 100644 --- a/test/pager1.test +++ b/test/pager1.test @@ -1879,6 +1879,7 @@ do_test pager1-18.1 { do_test pager1-18.2 { set root [db one "SELECT rootpage FROM sqlite_master"] set lockingpage [expr (0x10000/1024) + 1] + sqlite3_db_config db DEFENSIVE 0 execsql { PRAGMA writable_schema = 1; UPDATE sqlite_master SET rootpage = $lockingpage; @@ -1931,6 +1932,7 @@ do_test pager1-18.4 { db2 close do_test pager1-18.5 { sqlite3 db "" + sqlite3_db_config db DEFENSIVE 0 execsql { CREATE TABLE t1(a, b); CREATE TABLE t2(a, b); diff --git a/test/parser1.test b/test/parser1.test index c708dded1f..ad95b49091 100644 --- a/test/parser1.test +++ b/test/parser1.test @@ -28,6 +28,7 @@ do_catchsql_test parser1-1.1 { # COLLATE, ASC, and DESC keywords on the id list of a FK constraint, and that # those keywords are silently ignored. # +sqlite3_db_config db DEFENSIVE 0 do_execsql_test parser1-1.2 { CREATE TABLE t1( a TEXT PRIMARY KEY, diff --git a/test/pragma.test b/test/pragma.test index 90cd7e2dfe..1528984654 100644 --- a/test/pragma.test +++ b/test/pragma.test @@ -497,6 +497,7 @@ Page 6 is never used} {row 1 missing from index i2}} # Verify that PRAGMA integrity_check catches UNIQUE and NOT NULL # constraint violations. # +sqlite3_db_config db DEFENSIVE 0 do_execsql_test pragma-3.20 { CREATE TABLE t1(a,b); CREATE INDEX t1a ON t1(a); diff --git a/test/resetdb.test b/test/resetdb.test index ab52d7dd38..de2dfcffa3 100644 --- a/test/resetdb.test +++ b/test/resetdb.test @@ -65,6 +65,7 @@ do_test 110 { do_test 200 { # Thoroughly corrupt the database file by overwriting the first # page with randomness. + sqlite3_db_config db DEFENSIVE 0 catchsql { UPDATE sqlite_dbpage SET data=randomblob(4096) WHERE pgno=1; PRAGMA quick_check; @@ -125,6 +126,7 @@ do_test 310 { } {210 26000 ok wal 8192 12} # Corrupt the database again +sqlite3_db_config db DEFENSIVE 0 do_catchsql_test 320 { UPDATE sqlite_dbpage SET data=randomblob(8192) WHERE pgno=1; PRAGMA quick_check @@ -228,6 +230,7 @@ if {[nonzero_reserved_bytes]} { return } +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 710 { UPDATE sqlite_dbpage SET data= X'53514C69746520666F726D61742033000200030100402020000000000000001300000000000000000000000300000004000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000D00000003017C0001D801AC017C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002E03061715110145696E6465787431626374310443524541544520494E4445582074316263204F4E20743128622C63292A0206171311013F696E64657874316174310343524541544520494E44455820743161204F4E20743128612926010617111101397461626C657431743102435245415445205441424C4520743128612C622C6329' WHERE pgno=1; diff --git a/test/shared8.test b/test/shared8.test index 73f0d47627..f9607262b4 100644 --- a/test/shared8.test +++ b/test/shared8.test @@ -62,6 +62,7 @@ do_test 1.0 { } {1 i 2 ii 3 iii 4 iv} do_test 1.1 { + sqlite3_db_config db1 DEFENSIVE 0 execsql { PRAGMA writable_schema = 1; DELETE FROM sqlite_master WHERE 1; diff --git a/test/snapshot2.test b/test/snapshot2.test index 0f0e63961f..0f4f177cb3 100644 --- a/test/snapshot2.test +++ b/test/snapshot2.test @@ -238,4 +238,3 @@ do_test 5.4 { finish_test - diff --git a/test/snapshot3.test b/test/snapshot3.test index 8c330d7cbf..4dca202b1c 100644 --- a/test/snapshot3.test +++ b/test/snapshot3.test @@ -97,4 +97,3 @@ do_test 1.8 { } {1 SQLITE_ERROR_SNAPSHOT} finish_test - diff --git a/test/snapshot4.test b/test/snapshot4.test index 90a8d254e7..ac7f6ad6c2 100644 --- a/test/snapshot4.test +++ b/test/snapshot4.test @@ -72,4 +72,3 @@ do_test 1.4 { finish_test - diff --git a/test/snapshot_up.test b/test/snapshot_up.test index 651a92ac64..de8e5afab4 100644 --- a/test/snapshot_up.test +++ b/test/snapshot_up.test @@ -181,4 +181,3 @@ sqlite3_snapshot_free $::snap1 sqlite3_snapshot_free $::snap2 finish_test - diff --git a/test/swarmvtab3.test b/test/swarmvtab3.test index 6e52355d95..b062f9e952 100644 --- a/test/swarmvtab3.test +++ b/test/swarmvtab3.test @@ -231,4 +231,3 @@ forcedelete {*}[glob test.db*] forcedelete {*}[glob test_remote.db*] finish_test - diff --git a/test/swarmvtabfault.test b/test/swarmvtabfault.test index 083d80df2e..8cca3b2744 100644 --- a/test/swarmvtabfault.test +++ b/test/swarmvtabfault.test @@ -63,4 +63,3 @@ do_faultsim_test 1.1 -faults oom* -prep { } finish_test - diff --git a/test/table.test b/test/table.test index e24e3b9ed4..7be6b37695 100644 --- a/test/table.test +++ b/test/table.test @@ -276,6 +276,7 @@ do_test table-5.2.2 { db close forcedelete test.db sqlite3 db test.db + sqlite3_db_config db DEFENSIVE 0 db eval { CREATE TABLE t0(a,b); CREATE INDEX t ON t0(a); diff --git a/test/trigger7.test b/test/trigger7.test index 5fa7638f8e..ecc86dbb13 100644 --- a/test/trigger7.test +++ b/test/trigger7.test @@ -106,6 +106,7 @@ do_test trigger7-3.1 { # in the series. # do_test trigger7-99.1 { + sqlite3_db_config db DEFENSIVE 0 execsql { PRAGMA writable_schema=on; UPDATE sqlite_master SET sql='nonsense'; diff --git a/test/triggerE.test b/test/triggerE.test index 8b010fa176..9db7035325 100644 --- a/test/triggerE.test +++ b/test/triggerE.test @@ -68,6 +68,7 @@ foreach {tn defn} { # Test that variable references within trigger definitions loaded from # the sqlite_master table are automatically converted to NULL. # +sqlite3_db_config db DEFENSIVE 0 do_execsql_test 2.1 { PRAGMA writable_schema = 1; INSERT INTO sqlite_master VALUES('trigger', 'tr1', 't1', 0, diff --git a/test/unionvtab.test b/test/unionvtab.test index ab0fb7474a..5725869b95 100644 --- a/test/unionvtab.test +++ b/test/unionvtab.test @@ -455,4 +455,3 @@ do_execsql_test 5.4 { } {six 6} finish_test - diff --git a/test/unionvtabfault.test b/test/unionvtabfault.test index 061645cd6a..f66c9ac978 100644 --- a/test/unionvtabfault.test +++ b/test/unionvtabfault.test @@ -81,4 +81,3 @@ do_faultsim_test 2.0 -faults * -prep { finish_test - diff --git a/test/vtab1.test b/test/vtab1.test index 3c60a8f9c9..193a53acf7 100644 --- a/test/vtab1.test +++ b/test/vtab1.test @@ -1253,6 +1253,7 @@ ifcapable altertable { # characters that can be mistaken for printf() formatting directives. # do_test vtab1-17.1 { + sqlite3_db_config db DEFENSIVE 0 execsql { PRAGMA writable_schema = 1; INSERT INTO sqlite_master VALUES( diff --git a/test/wherelimit2.test b/test/wherelimit2.test index 43a37958ee..83c04b14cf 100644 --- a/test/wherelimit2.test +++ b/test/wherelimit2.test @@ -297,4 +297,3 @@ do_test 5.5 { finish_test - diff --git a/test/window5.test b/test/window5.test index 40d218f2ab..890d6704b4 100644 --- a/test/window5.test +++ b/test/window5.test @@ -94,4 +94,3 @@ do_execsql_test 3.1 { finish_test - diff --git a/test/windowfault.test b/test/windowfault.test index e08d994166..9a3b219aa7 100644 --- a/test/windowfault.test +++ b/test/windowfault.test @@ -163,4 +163,3 @@ do_faultsim_test 8 -faults oom-t* -prep { } finish_test - diff --git a/test/zipfile2.test b/test/zipfile2.test index e9b93cab12..987e4f0cfd 100644 --- a/test/zipfile2.test +++ b/test/zipfile2.test @@ -241,4 +241,3 @@ do_execsql_test 6.3 { } {test2} finish_test - diff --git a/tool/genfkey.test b/tool/genfkey.test index 3c0073e953..16c67bb3cc 100644 --- a/tool/genfkey.test +++ b/tool/genfkey.test @@ -351,4 +351,3 @@ do_test genfkey-6.7 { SELECT * FROM child; } } {1 1} -