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

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

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 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 # 2010 November 1 1 # 2010 November 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 INSERT INTO t2 VALUES('c', 'd'); 80 INSERT INTO t2 VALUES('c', 'd');
81 } 81 }
82 do_execsql_test 2.1.2 { 82 do_execsql_test 2.1.2 {
83 PRAGMA locking_mode = exclusive; 83 PRAGMA locking_mode = exclusive;
84 PRAGMA journal_mode = WAL; 84 PRAGMA journal_mode = WAL;
85 INSERT INTO t2 VALUES('e', 'f'); 85 INSERT INTO t2 VALUES('e', 'f');
86 INSERT INTO t2 VALUES('g', 'h'); 86 INSERT INTO t2 VALUES('g', 'h');
87 } {exclusive wal} 87 } {exclusive wal}
88 88
89 do_test 2.1.3 { 89 do_test 2.1.3 {
90 file copy -force test.db test2.db 90 forcecopy test.db test2.db
91 file copy -force test.db-wal test2.db-wal 91 forcecopy test.db-wal test2.db-wal
92 sqlite3 db2 test2.db 92 sqlite3 db2 test2.db
93 catchsql { SELECT * FROM t2 } db2 93 catchsql { SELECT * FROM t2 } db2
94 } {1 {unable to open database file}} 94 } {1 {unable to open database file}}
95 do_test 2.1.4 { 95 do_test 2.1.4 {
96 catchsql { PRAGMA journal_mode = delete } db2 96 catchsql { PRAGMA journal_mode = delete } db2
97 } {1 {unable to open database file}} 97 } {1 {unable to open database file}}
98 do_test 2.1.5 { 98 do_test 2.1.5 {
99 execsql { 99 execsql {
100 PRAGMA locking_mode = exclusive; 100 PRAGMA locking_mode = exclusive;
101 PRAGMA journal_mode = delete; 101 PRAGMA journal_mode = delete;
102 SELECT * FROM t2; 102 SELECT * FROM t2;
103 } db2 103 } db2
104 } {exclusive delete a b c d e f g h} 104 } {exclusive delete a b c d e f g h}
105 105
106 do_test 2.2.1 { 106 do_test 2.2.1 {
107 file copy -force test.db test2.db 107 forcecopy test.db test2.db
108 file copy -force test.db-wal test2.db-wal 108 forcecopy test.db-wal test2.db-wal
109 sqlite3 db3 test2.db -vfs tvfsshm 109 sqlite3 db3 test2.db -vfs tvfsshm
110 sqlite3 db2 test2.db 110 sqlite3 db2 test2.db
111 execsql { SELECT * FROM t2 } db3 111 execsql { SELECT * FROM t2 } db3
112 } {a b c d e f g h} 112 } {a b c d e f g h}
113 113
114 do_test 2.2.2 { 114 do_test 2.2.2 {
115 execsql { PRAGMA locking_mode = exclusive } db2 115 execsql { PRAGMA locking_mode = exclusive } db2
116 catchsql { PRAGMA journal_mode = delete } db2 116 catchsql { PRAGMA journal_mode = delete } db2
117 } {1 {database is locked}} 117 } {1 {database is locked}}
118 118
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 sqlite3 db2 test.db -vfs tvfsshm 175 sqlite3 db2 test.db -vfs tvfsshm
176 catchsql { SELECT * FROM t1 } db2 176 catchsql { SELECT * FROM t1 } db2
177 } {1 {database is locked}} 177 } {1 {database is locked}}
178 db close 178 db close
179 db2 close 179 db2 close
180 180
181 tvfs delete 181 tvfs delete
182 tvfsshm delete 182 tvfsshm delete
183 183
184 finish_test 184 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698