/ Check-in [02b6f8f2]
Login

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

Overview
Comment:Test case modifications to support SEE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 02b6f8f2778c371130c512e980c3db07c7e76dcf7dd92a878b86e4b6a47ca307
User & Date: drh 2018-10-12 15:01:56
Context
2018-10-18
14:59
Add the SQLITE_CHANGESETAPPLY_INVERT flag to sessions. For inverting and applying a changeset in a single step. check-in: d4b6406e user: dan tags: trunk
2018-10-12
15:01
Test case modifications to support SEE. check-in: 02b6f8f2 user: drh tags: trunk
2018-10-11
18:41
Add the textkey and textrekey pragmas. check-in: f03164d4 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/dbstatus.test.

   375    375     }
   376    376   }
   377    377   
   378    378   #-------------------------------------------------------------------------
   379    379   # The following tests focus on DBSTATUS_CACHE_USED_SHARED
   380    380   #
   381    381   ifcapable shared_cache {
   382         -  if {[permutation]=="memsys3"
          382  +  if {([permutation]=="memsys3"
   383    383         || [permutation]=="memsys5"
   384         -      || $::tcl_platform(os)=="Linux"} {
          384  +      || $::tcl_platform(os)=="Linux") && ![sqlite3 -has-codec]} {
   385    385       proc do_cacheused_test {tn db res} {
   386    386         set cu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED 0]
   387    387         set pcu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED_SHARED 0]
   388    388         set cu [lindex $cu 1]
   389    389         set pcu [lindex $pcu 1]
   390    390         uplevel [list do_test $tn [list list $cu $pcu] "#/$res/"]
   391    391       }

Changes to test/pragma3.test.

    11     11   # This file implements regression tests for SQLite library.
    12     12   #
    13     13   # This file implements tests for PRAGMA data_version command.
    14     14   #
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18         -do_not_use_codec
           18  +
           19  +if {[sqlite3 -has-codec]} {
           20  +  finish_test
           21  +  return
           22  +}
    19     23   
    20     24   do_execsql_test pragma3-100 {
    21     25     PRAGMA data_version;
    22     26   } {1}
    23     27   do_execsql_test pragma3-101 {
    24     28     PRAGMA temp.data_version;
    25     29   } {1}

Changes to test/shared.test.

  1141   1141   } {1 {no such table: t1}}
  1142   1142   do_test shared-$av-16.8 {
  1143   1143     file exists test1.db
  1144   1144   } {0}  ;# Verify that the database is in-memory
  1145   1145   
  1146   1146   # Shared cache on named memory databases attached to readonly connections.
  1147   1147   #
  1148         -do_test shared-$av-16.8.1 {
         1148  +if {![sqlite3 -has-codec]} {
         1149  +  do_test shared-$av-16.8.1 {
         1150  +    db1 close
         1151  +    db2 close
         1152  +  
         1153  +    sqlite3 db test1.db
         1154  +    db eval { 
         1155  +      CREATE TABLE yy(a, b);
         1156  +      INSERT INTO yy VALUES(77, 88);
         1157  +    }
         1158  +    db close
         1159  +  
         1160  +    sqlite3 db1 test1.db -uri 1 -readonly 1
         1161  +    sqlite3 db2 test2.db -uri 1 
         1162  +  
         1163  +    db1 eval { 
         1164  +      ATTACH 'file:mem?mode=memory&cache=shared' AS shared; 
         1165  +      CREATE TABLE shared.xx(a, b);
         1166  +      INSERT INTO xx VALUES(55, 66);
         1167  +    }
         1168  +    db2 eval { 
         1169  +      ATTACH 'file:mem?mode=memory&cache=shared' AS shared;
         1170  +      SELECT * FROM xx;
         1171  +    }
         1172  +  } {55 66}
         1173  +  
         1174  +  do_test shared-$av-16.8.2 { db1 eval { SELECT * FROM yy } } {77 88}
         1175  +  do_test shared-$av-16.8.3 { 
         1176  +    list [catch {db1 eval { INSERT INTO yy VALUES(1, 2) }} msg] $msg
         1177  +  } {1 {attempt to write a readonly database}}
         1178  +  
  1149   1179     db1 close
  1150   1180     db2 close
  1151         -
  1152         -  sqlite3 db test1.db
  1153         -  db eval { 
  1154         -    CREATE TABLE yy(a, b);
  1155         -    INSERT INTO yy VALUES(77, 88);
  1156         -  }
  1157         -  db close
  1158         -
  1159         -  sqlite3 db1 test1.db -uri 1 -readonly 1
  1160         -  sqlite3 db2 test2.db -uri 1 
  1161         -
  1162         -  db1 eval { 
  1163         -    ATTACH 'file:mem?mode=memory&cache=shared' AS shared; 
  1164         -    CREATE TABLE shared.xx(a, b);
  1165         -    INSERT INTO xx VALUES(55, 66);
  1166         -  }
  1167         -  db2 eval { 
  1168         -    ATTACH 'file:mem?mode=memory&cache=shared' AS shared;
  1169         -    SELECT * FROM xx;
  1170         -  }
  1171         -} {55 66}
  1172         -
  1173         -do_test shared-$av-16.8.2 { db1 eval { SELECT * FROM yy } } {77 88}
  1174         -do_test shared-$av-16.8.3 { 
  1175         -  list [catch {db1 eval { INSERT INTO yy VALUES(1, 2) }} msg] $msg
  1176         -} {1 {attempt to write a readonly database}}
  1177         -
  1178         -db1 close
  1179         -db2 close
         1181  +}
  1180   1182   
  1181   1183   }  ;# end of autovacuum on/off loop
  1182   1184   
  1183   1185   sqlite3_enable_shared_cache $::enable_shared_cache
  1184   1186   finish_test