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

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

Issue 2765553002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: 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
OLDNEW
1 # 2014-05-07 1 # 2014-05-07
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } {hello world 12345 67890} 175 } {hello world 12345 67890}
176 do_test nolock-3.12 { 176 do_test nolock-3.12 {
177 list xLock $::tvfs_calls(xLock) xUnlock $::tvfs_calls(xUnlock) \ 177 list xLock $::tvfs_calls(xLock) xUnlock $::tvfs_calls(xUnlock) \
178 xCheckReservedLock $::tvfs_calls(xCheckReservedLock) \ 178 xCheckReservedLock $::tvfs_calls(xCheckReservedLock) \
179 xAccess $::tvfs_calls(xAccess) 179 xAccess $::tvfs_calls(xAccess)
180 } {xLock 0 xUnlock 0 xCheckReservedLock 0 xAccess 0} 180 } {xLock 0 xUnlock 0 xCheckReservedLock 0 xAccess 0}
181 181
182 db2 close 182 db2 close
183 db close 183 db close
184 tvfs delete 184 tvfs delete
185
186 if {[permutation]!="inmemory_journal"} {
187 # 2016-03-11: Make sure all works when transitioning to WAL mode
188 # under nolock.
189 #
190 do_test nolock-4.1 {
191 forcedelete test.db
192 sqlite3 db file:test.db?nolock=1 -uri 1
193 db eval {
194 PRAGMA journal_mode=WAL;
195 CREATE TABLE t1(x);
196 INSERT INTO t1 VALUES('youngling');
197 SELECT * FROM t1;
198 }
199 } {delete youngling}
200 db close
201
202 do_test nolock-4.2 {
203 forcedelete test.db
204 sqlite3 db test.db
205 db eval {
206 PRAGMA journal_mode=WAL;
207 CREATE TABLE t1(x);
208 INSERT INTO t1 VALUES('catbird');
209 SELECT * FROM t1;
210 }
211 } {wal catbird}
212 do_test nolock-4.3 {
213 db close
214 sqlite3 db file:test.db?nolock=1 -uri 1
215 set rc [catch {db eval {SELECT * FROM t1}} msg]
216 lappend rc $msg
217 } {1 {unable to open database file}}
218 }
219
185 finish_test 220 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698