SQLite

Check-in [24a95e1437]
Login

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

Overview
Comment:Add an extra snapshot related test case.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 24a95e143785bb8e12198092d13c979ec2e116fa8b55d0bf482cb473a92294d8
User & Date: dan 2017-09-25 09:37:37.738
Context
2017-09-27
16:51
Disable tests for the LIKE optimization when ICU is enabled, since the LIKE optimization only works for the built-in LIKE operator and ICU overrides the built-in. (check-in: f5ef2e1bcd user: drh tags: trunk)
2017-09-25
09:37
Add an extra snapshot related test case. (check-in: 24a95e1437 user: dan tags: trunk)
2017-09-22
16:23
Use the updated Win32 VFS semantics for winOpen from check-in [5d03c738e9] for WinRT, et al, as well. (check-in: 2c03d8b8f0 user: mistachkin tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/snapshot2.test.
192
193
194
195
196
197
198
199








































200

} {1 SQLITE_ERROR}
do_test 4.7 {
  execsql {
    PRAGMA aux.journal_mode = delete;
  }
  list [catch { sqlite3_snapshot_recover db aux } msg] $msg
} {1 SQLITE_ERROR}









































finish_test









>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
} {1 SQLITE_ERROR}
do_test 4.7 {
  execsql {
    PRAGMA aux.journal_mode = delete;
  }
  list [catch { sqlite3_snapshot_recover db aux } msg] $msg
} {1 SQLITE_ERROR}

#-------------------------------------------------------------------------
reset_db
sqlite3 db2 test.db 
do_execsql_test 5.0 {
  CREATE TABLE t2(x);
  PRAGMA journal_mode = wal;
  INSERT INTO t2 VALUES('abc');
  INSERT INTO t2 VALUES('def');
  INSERT INTO t2 VALUES('ghi');
} {wal}

do_test 5.1 {
  execsql { 
    SELECT * FROM t2;
    BEGIN;
  } db2
  set snap [sqlite3_snapshot_get_blob db2 main]
  db2 eval END
} {}

do_test 5.2 {
  execsql BEGIN db2
  sqlite3_snapshot_open_blob db2 main $snap
  db2 eval { SELECT * FROM t2 ; END }
} {abc def ghi}

do_test 5.3 {
  execsql { PRAGMA wal_checkpoint = RESTART }
  execsql BEGIN db2
  sqlite3_snapshot_open_blob db2 main $snap
  db2 eval { SELECT * FROM t2 ; END }
} {abc def ghi}

do_test 5.4 {
  execsql { INSERT INTO t2 VALUES('jkl') } 
  execsql BEGIN db2
  list [catch { sqlite3_snapshot_open_blob db2 main $snap } msg] $msg
} {1 SQLITE_BUSY_SNAPSHOT}


finish_test