Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: third_party/sqlite/src/test/wal6.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/wal5.test ('k') | third_party/sqlite/src/test/wal8.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2010 December 1 1 # 2010 December 1
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 sqlite3 db2 test.db 227 sqlite3 db2 test.db
228 } {} 228 } {}
229 229
230 do_test 4.4.1 { 230 do_test 4.4.1 {
231 catchsql { SELECT * FROM t1 } db2 231 catchsql { SELECT * FROM t1 } db2
232 } {0 {1 2}} 232 } {0 {1 2}}
233 do_test 4.4.2 { 233 do_test 4.4.2 {
234 catchsql { SELECT * FROM t2 } db2 234 catchsql { SELECT * FROM t2 } db2
235 } {1 {database disk image is malformed}} 235 } {1 {database disk image is malformed}}
236 236
237 #-------------------------------------------------------------------------
238 # Confirm that it is possible to get an SQLITE_BUSY_SNAPSHOT error from
239 # "BEGIN EXCLUSIVE" if the connection already has an open read-transaction.
240 #
241 db close
242 db2 close
243 reset_db
244 sqlite3 db2 test.db
245 do_execsql_test 5.1 {
246 PRAGMA journal_mode = wal;
247 CREATE TABLE t1(x, y);
248 INSERT INTO t1 VALUES(1, 2);
249 INSERT INTO t1 VALUES(3, 4);
250 } {wal}
251 do_test 5.2 {
252 set res [list]
253 db eval {
254 SELECT * FROM t1
255 } {
256 if {$x==1} {
257 db2 eval { INSERT INTO t1 VALUES(5, 6) }
258 }
259 if {$x==3} {
260 set res [catchsql {BEGIN EXCLUSIVE}]
261 lappend res [sqlite3_extended_errcode db]
262 }
263 }
264 set res
265 } {1 {database is locked} SQLITE_BUSY_SNAPSHOT}
266
267
237 268
238 finish_test 269 finish_test
239
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/wal5.test ('k') | third_party/sqlite/src/test/wal8.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698