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

Unified Diff: third_party/sqlite/src/test/nolock.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/nockpt.test ('k') | third_party/sqlite/src/test/oserror.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/nolock.test
diff --git a/third_party/sqlite/src/test/nolock.test b/third_party/sqlite/src/test/nolock.test
index 331af08ad74e235a28ae8acb02ca81d32bc2f36c..e732dcf13bd8f77424f80aca7aa47e89a3929b82 100644
--- a/third_party/sqlite/src/test/nolock.test
+++ b/third_party/sqlite/src/test/nolock.test
@@ -182,4 +182,39 @@ do_test nolock-3.12 {
db2 close
db close
tvfs delete
+
+if {[permutation]!="inmemory_journal"} {
+ # 2016-03-11: Make sure all works when transitioning to WAL mode
+ # under nolock.
+ #
+ do_test nolock-4.1 {
+ forcedelete test.db
+ sqlite3 db file:test.db?nolock=1 -uri 1
+ db eval {
+ PRAGMA journal_mode=WAL;
+ CREATE TABLE t1(x);
+ INSERT INTO t1 VALUES('youngling');
+ SELECT * FROM t1;
+ }
+ } {delete youngling}
+ db close
+
+ do_test nolock-4.2 {
+ forcedelete test.db
+ sqlite3 db test.db
+ db eval {
+ PRAGMA journal_mode=WAL;
+ CREATE TABLE t1(x);
+ INSERT INTO t1 VALUES('catbird');
+ SELECT * FROM t1;
+ }
+ } {wal catbird}
+ do_test nolock-4.3 {
+ db close
+ sqlite3 db file:test.db?nolock=1 -uri 1
+ set rc [catch {db eval {SELECT * FROM t1}} msg]
+ lappend rc $msg
+ } {1 {unable to open database file}}
+}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/nockpt.test ('k') | third_party/sqlite/src/test/oserror.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698