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

Side by Side Diff: third_party/sqlite/src/test/journal2.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/join5.test ('k') | third_party/sqlite/src/test/json101.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 June 16 1 # 2010 June 16
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 db2 close 197 db2 close
198 } {} 198 } {}
199 db close 199 db close
200 200
201 #------------------------------------------------------------------------- 201 #-------------------------------------------------------------------------
202 # Test that it is possible to switch from journal_mode=truncate to 202 # Test that it is possible to switch from journal_mode=truncate to
203 # journal_mode=WAL on a SAFE_DELETE file-system. SQLite should close and 203 # journal_mode=WAL on a SAFE_DELETE file-system. SQLite should close and
204 # delete the journal file when committing the transaction that switches 204 # delete the journal file when committing the transaction that switches
205 # the system to WAL mode. 205 # the system to WAL mode.
206 # 206 #
207 ifcapable wal { 207 if {[wal_is_capable]} {
208 do_test journal2-2.1 { 208 do_test journal2-2.1 {
209 faultsim_delete_and_reopen 209 faultsim_delete_and_reopen
210 set ::oplog [list] 210 set ::oplog [list]
211 execsql { PRAGMA journal_mode = persist } 211 execsql { PRAGMA journal_mode = persist }
212 set ::oplog 212 set ::oplog
213 } {} 213 } {}
214 do_test journal2-2.2 { 214 do_test journal2-2.2 {
215 execsql { 215 execsql {
216 CREATE TABLE t1(x); 216 CREATE TABLE t1(x);
217 INSERT INTO t1 VALUES(3.14159); 217 INSERT INTO t1 VALUES(3.14159);
218 } 218 }
219 set ::oplog 219 set ::oplog
220 } {xOpen test.db-journal} 220 } {xOpen test.db-journal}
221 do_test journal2-2.3 { 221 do_test journal2-2.3 {
222 expr {[file size test.db-journal] > 512} 222 expr {[file size test.db-journal] > 512}
223 } {1} 223 } {1}
224 do_test journal2-2.4 { 224 do_test journal2-2.4 {
225 set ::oplog [list] 225 set ::oplog [list]
226 execsql { PRAGMA journal_mode = WAL } 226 execsql { PRAGMA journal_mode = WAL }
227 set ::oplog 227 set ::oplog
228 } {xClose test.db-journal xDelete test.db-journal} 228 } {xClose test.db-journal xDelete test.db-journal}
229 db close 229 db close
230 } 230 }
231 231
232 tvfs delete 232 tvfs delete
233 finish_test 233 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/join5.test ('k') | third_party/sqlite/src/test/json101.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698