| OLD | NEW |
| 1 # 2010 May 5 | 1 # 2010 May 5 |
| 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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 } | 1187 } |
| 1188 | 1188 |
| 1189 #------------------------------------------------------------------------- | 1189 #------------------------------------------------------------------------- |
| 1190 # Test that "PRAGMA checkpoint_fullsync" appears to be working. | 1190 # Test that "PRAGMA checkpoint_fullsync" appears to be working. |
| 1191 # | 1191 # |
| 1192 foreach {tn sql reslist} { | 1192 foreach {tn sql reslist} { |
| 1193 1 { } {10 0 4 0 6 0} | 1193 1 { } {10 0 4 0 6 0} |
| 1194 2 { PRAGMA checkpoint_fullfsync = 1 } {10 4 4 2 6 2} | 1194 2 { PRAGMA checkpoint_fullfsync = 1 } {10 4 4 2 6 2} |
| 1195 3 { PRAGMA checkpoint_fullfsync = 0 } {10 0 4 0 6 0} | 1195 3 { PRAGMA checkpoint_fullfsync = 0 } {10 0 4 0 6 0} |
| 1196 } { | 1196 } { |
| 1197 ifcapable default_ckptfullfsync { |
| 1198 if {[string trim $sql]==""} continue |
| 1199 } |
| 1197 faultsim_delete_and_reopen | 1200 faultsim_delete_and_reopen |
| 1198 | 1201 |
| 1199 execsql {PRAGMA auto_vacuum = 0} | 1202 execsql {PRAGMA auto_vacuum = 0; PRAGMA synchronous = FULL;} |
| 1200 execsql $sql | 1203 execsql $sql |
| 1201 do_execsql_test wal2-14.$tn.0 { PRAGMA page_size = 4096 } {} | 1204 do_execsql_test wal2-14.$tn.0 { PRAGMA page_size = 4096 } {} |
| 1202 do_execsql_test wal2-14.$tn.1 { PRAGMA journal_mode = WAL } {wal} | 1205 do_execsql_test wal2-14.$tn.1 { PRAGMA journal_mode = WAL } {wal} |
| 1203 | 1206 |
| 1204 set sqlite_sync_count 0 | 1207 set sqlite_sync_count 0 |
| 1205 set sqlite_fullsync_count 0 | 1208 set sqlite_fullsync_count 0 |
| 1206 | 1209 |
| 1207 do_execsql_test wal2-14.$tn.2 { | 1210 do_execsql_test wal2-14.$tn.2 { |
| 1208 PRAGMA wal_autocheckpoint = 10; | 1211 PRAGMA wal_autocheckpoint = 10; |
| 1209 CREATE TABLE t1(a, b); -- 2 wal syncs | 1212 CREATE TABLE t1(a, b); -- 2 wal syncs |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 list $::sync(normal) $::sync(full) | 1316 list $::sync(normal) $::sync(full) |
| 1314 } $ckpt_sync | 1317 } $ckpt_sync |
| 1315 | 1318 |
| 1316 db close | 1319 db close |
| 1317 tvfs delete | 1320 tvfs delete |
| 1318 } | 1321 } |
| 1319 | 1322 |
| 1320 | 1323 |
| 1321 | 1324 |
| 1322 finish_test | 1325 finish_test |
| OLD | NEW |