/ Check-in [911e8a17]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:More test-case adjustments for defensive mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | read-only-shadow
Files: files | file ages | folders
SHA3-256: 911e8a17a3810cd7042e91a32aba80dc3d6be88320c208e48f7bcee8b22a0ff2
User & Date: drh 2018-11-07 14:41:08
Context
2018-11-07
16:12
Merge the onefile permutation fix from trunk. check-in: e543bff8 user: drh tags: read-only-shadow
14:41
More test-case adjustments for defensive mode. check-in: 911e8a17 user: drh tags: read-only-shadow
13:41
Merge the permutations fix from trunk. check-in: b753d849 user: drh tags: read-only-shadow
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/corrupt.test.

   128    128     sqlite3 db test.db
   129    129     list
   130    130   } {}
   131    131   do_test corrupt-3.2 {
   132    132     set t1_r [execsql {SELECT rootpage FROM sqlite_master WHERE name = 't1i1'}]
   133    133     set t1i1_r [execsql {SELECT rootpage FROM sqlite_master WHERE name = 't1'}]
   134    134     set cookie [expr [execsql {PRAGMA schema_version}] + 1]
          135  +  sqlite3_db_config db DEFENSIVE 0
   135    136     execsql "
   136    137       PRAGMA writable_schema = 1;
   137    138       UPDATE sqlite_master SET rootpage = $t1_r WHERE name = 't1';
   138    139       UPDATE sqlite_master SET rootpage = $t1i1_r WHERE name = 't1i1';
   139    140       PRAGMA writable_schema = 0;
   140    141       PRAGMA schema_version = $cookie;
   141    142     "

Changes to test/default.test.

   102    102   # Do now allow bound parameters in new DEFAULT values. 
   103    103   # Silently convert bound parameters to NULL in DEFAULT causes
   104    104   # in the sqlite_master table, for backwards compatibility.
   105    105   #
   106    106   db close
   107    107   forcedelete test.db
   108    108   sqlite3 db test.db
          109  +sqlite3_db_config db DEFENSIVE 0
   109    110   do_execsql_test default-4.0 {
   110    111     CREATE TABLE t1(a TEXT, b TEXT DEFAULT(99));
   111    112     PRAGMA writable_schema=ON;
   112    113     UPDATE sqlite_master SET sql='CREATE TABLE t1(a TEXT, b TEXT DEFAULT(:xyz))';
   113    114   } {}
   114    115   db close 
   115    116   sqlite3 db test.db

Changes to test/e_fts3.test.

   673    673   #
   674    674   set DO_MALLOC_TEST 0
   675    675   ddl_test   10.1.1 { CREATE VIRTUAL TABLE ta USING fts3 }
   676    676   write_test 10.1.2 ta_content { 
   677    677     INSERT INTO ta VALUES('During a summer vacation in 1790') }
   678    678   write_test 10.1.3 ta_content {
   679    679     INSERT INTO ta VALUES('Wordsworth went on a walking tour') }
          680  +sqlite3_db_config db DEFENSIVE 0
   680    681   write_test 10.1.4 ta_content { DELETE FROM ta_content WHERE rowid = 2 }
   681    682   read_test  10.1.5 {
   682    683     SELECT * FROM ta WHERE ta MATCH 'summer'
   683    684   } {{During a summer vacation in 1790}}
   684    685   error_test 10.1.6 {
   685    686     SELECT * FROM ta WHERE ta MATCH 'walking'
   686    687   } {database disk image is malformed}

Changes to test/misc7.test.

   430    430         }
   431    431       } {0 32}
   432    432       
   433    433       # sqlite3_test_control_pending_page [expr ($::sqlite_pending_byte / 1024) + 1]
   434    434       set ::pending_byte_page [expr ($::sqlite_pending_byte / 1024) + 1]
   435    435       sqlite3_test_control_pending_byte $::sqlite_pending_byte 
   436    436       do_test misc7-17.3 {
          437  +      sqlite3_db_config db DEFENSIVE 0
   437    438         db eval {
   438    439           pragma writable_schema = true;
   439    440           UPDATE sqlite_master 
   440    441             SET rootpage = $pending_byte_page
   441    442             WHERE type = 'table' AND name = 't3';
   442    443         }
   443    444         execsql {