SQLite

Check-in [a77c8a78]
Login

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

Overview
Comment:Fix the pager2-3.1 test case so that it does not run if a required dependence (shared-cache) is omitted from the build. Fix for forum post 7a028538a7.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a77c8a780f884d0cb01d20912cf1aeec0bb7f3999d23117fe5bd82bc4405d483
User & Date: drh 2023-05-05 14:14:10
Context
2023-05-05
14:16
Updates to compile-time option usage and especially to the compile-time option test script in tool/omittest.tcl. (check-in: fece588b user: drh tags: trunk)
14:14
Fix the pager2-3.1 test case so that it does not run if a required dependence (shared-cache) is omitted from the build. Fix for forum post 7a028538a7. (check-in: a77c8a78 user: drh tags: trunk)
11:47
Allow virtual tables to prepare writes to shadow tables in defensive mode from with xRelease() callbacks - even if the xRelease() is invoked from within sqlite3_finalize(). (check-in: a1710649 user: dan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/pager2.test.

143
144
145
146
147
148
149

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

169
170
    INSERT INTO t1 VALUES(zeroblob(5000), zeroblob(5000));
    DELETE FROM t1;
    PRAGMA incremental_vacuum;
  }
  file size test.db
} {3072}


#-------------------------------------------------------------------------
# Test that shared in-memory databases seem to work.
#
db close
do_test pager2-3.1 {
  forcedelete test.db
  sqlite3_shutdown
  sqlite3_config_uri 1

  sqlite3 db1 {file:test.db?mode=memory&cache=shared}
  sqlite3 db2 {file:test.db?mode=memory&cache=shared}
  sqlite3 db3 test.db

  db1 eval { CREATE TABLE t1(a, b) }
  db2 eval { INSERT INTO t1 VALUES(1, 2) }
  list [catch { db3 eval { INSERT INTO t1 VALUES(3, 4) } } msg] $msg
} {1 {no such table: t1}}

db1 close


finish_test







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
>


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

168
169
170
171
    INSERT INTO t1 VALUES(zeroblob(5000), zeroblob(5000));
    DELETE FROM t1;
    PRAGMA incremental_vacuum;
  }
  file size test.db
} {3072}

ifcapable shared_cache {
  #-------------------------------------------------------------------------
  # Test that shared in-memory databases seem to work.
  #
  db close
  do_test pager2-3.1 {
    forcedelete test.db
    sqlite3_shutdown
    sqlite3_config_uri 1
  
    sqlite3 db1 {file:test.db?mode=memory&cache=shared}
    sqlite3 db2 {file:test.db?mode=memory&cache=shared}
    sqlite3 db3 test.db
  
    db1 eval { CREATE TABLE t1(a, b) }
    db2 eval { INSERT INTO t1 VALUES(1, 2) }
    list [catch { db3 eval { INSERT INTO t1 VALUES(3, 4) } } msg] $msg
  } {1 {no such table: t1}}

  db1 close
}

finish_test