/ 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 Unified Diffs Show Whitespace Changes Patch

Changes to test/dbstatus.test.

375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
  }
}

#-------------------------------------------------------------------------
# The following tests focus on DBSTATUS_CACHE_USED_SHARED
#
ifcapable shared_cache {
  if {[permutation]=="memsys3"
      || [permutation]=="memsys5"
      || $::tcl_platform(os)=="Linux"} {
    proc do_cacheused_test {tn db res} {
      set cu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED 0]
      set pcu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED_SHARED 0]
      set cu [lindex $cu 1]
      set pcu [lindex $pcu 1]
      uplevel [list do_test $tn [list list $cu $pcu] "#/$res/"]
    }







|

|







375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
  }
}

#-------------------------------------------------------------------------
# The following tests focus on DBSTATUS_CACHE_USED_SHARED
#
ifcapable shared_cache {
  if {([permutation]=="memsys3"
      || [permutation]=="memsys5"
      || $::tcl_platform(os)=="Linux") && ![sqlite3 -has-codec]} {
    proc do_cacheused_test {tn db res} {
      set cu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED 0]
      set pcu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED_SHARED 0]
      set cu [lindex $cu 1]
      set pcu [lindex $pcu 1]
      uplevel [list do_test $tn [list list $cu $pcu] "#/$res/"]
    }

Changes to test/pragma3.test.

11
12
13
14
15
16
17
18





19
20
21
22
23
24
25
# This file implements regression tests for SQLite library.
#
# This file implements tests for PRAGMA data_version command.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl
do_not_use_codec






do_execsql_test pragma3-100 {
  PRAGMA data_version;
} {1}
do_execsql_test pragma3-101 {
  PRAGMA temp.data_version;
} {1}







<
>
>
>
>
>







11
12
13
14
15
16
17

18
19
20
21
22
23
24
25
26
27
28
29
# This file implements regression tests for SQLite library.
#
# This file implements tests for PRAGMA data_version command.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl


if {[sqlite3 -has-codec]} {
  finish_test
  return
}

do_execsql_test pragma3-100 {
  PRAGMA data_version;
} {1}
do_execsql_test pragma3-101 {
  PRAGMA temp.data_version;
} {1}

Changes to test/shared.test.

1141
1142
1143
1144
1145
1146
1147

1148
1149
1150
1151
1152
1153
1154
....
1173
1174
1175
1176
1177
1178
1179

1180
1181
1182
1183
1184
} {1 {no such table: t1}}
do_test shared-$av-16.8 {
  file exists test1.db
} {0}  ;# Verify that the database is in-memory

# Shared cache on named memory databases attached to readonly connections.
#

do_test shared-$av-16.8.1 {
  db1 close
  db2 close

  sqlite3 db test1.db
  db eval { 
    CREATE TABLE yy(a, b);
................................................................................
do_test shared-$av-16.8.2 { db1 eval { SELECT * FROM yy } } {77 88}
do_test shared-$av-16.8.3 { 
  list [catch {db1 eval { INSERT INTO yy VALUES(1, 2) }} msg] $msg
} {1 {attempt to write a readonly database}}

db1 close
db2 close


}  ;# end of autovacuum on/off loop

sqlite3_enable_shared_cache $::enable_shared_cache
finish_test







>







 







>





1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
....
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
} {1 {no such table: t1}}
do_test shared-$av-16.8 {
  file exists test1.db
} {0}  ;# Verify that the database is in-memory

# Shared cache on named memory databases attached to readonly connections.
#
if {![sqlite3 -has-codec]} {
  do_test shared-$av-16.8.1 {
    db1 close
    db2 close
  
    sqlite3 db test1.db
    db eval { 
      CREATE TABLE yy(a, b);
................................................................................
  do_test shared-$av-16.8.2 { db1 eval { SELECT * FROM yy } } {77 88}
  do_test shared-$av-16.8.3 { 
    list [catch {db1 eval { INSERT INTO yy VALUES(1, 2) }} msg] $msg
  } {1 {attempt to write a readonly database}}
  
  db1 close
  db2 close
}

}  ;# end of autovacuum on/off loop

sqlite3_enable_shared_cache $::enable_shared_cache
finish_test