OLD | NEW |
1 # 2010 July 28 | 1 # 2010 July 28 |
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 # The following tests - fallocate-2.* - test that things work in WAL | 72 # The following tests - fallocate-2.* - test that things work in WAL |
73 # mode as well. | 73 # mode as well. |
74 # | 74 # |
75 set skipwaltests [expr { | 75 set skipwaltests [expr { |
76 [permutation]=="journaltest" || [permutation]=="inmemory_journal" | 76 [permutation]=="journaltest" || [permutation]=="inmemory_journal" |
77 }] | 77 }] |
78 ifcapable !wal { set skipwaltests 1 } | 78 ifcapable !wal { set skipwaltests 1 } |
79 | 79 |
80 if {!$skipwaltests} { | 80 if {!$skipwaltests} { |
81 db close | 81 db close |
82 file delete -force test.db | 82 forcedelete test.db |
83 sqlite3 db test.db | 83 sqlite3 db test.db |
84 file_control_chunksize_test db main [expr 32*1024] | 84 file_control_chunksize_test db main [expr 32*1024] |
85 | 85 |
86 do_test fallocate-2.1 { | 86 do_test fallocate-2.1 { |
87 execsql { | 87 execsql { |
88 PRAGMA page_size = 1024; | 88 PRAGMA page_size = 1024; |
89 PRAGMA journal_mode = WAL; | 89 PRAGMA journal_mode = WAL; |
90 CREATE TABLE t1(a, b); | 90 CREATE TABLE t1(a, b); |
91 } | 91 } |
92 file size test.db | 92 file size test.db |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 do_test fallocate-2.8 { | 137 do_test fallocate-2.8 { |
138 execsql { COMMIT } db2 | 138 execsql { COMMIT } db2 |
139 execsql { PRAGMA wal_checkpoint } | 139 execsql { PRAGMA wal_checkpoint } |
140 file size test.db | 140 file size test.db |
141 } [expr 32*1024] | 141 } [expr 32*1024] |
142 } | 142 } |
143 | 143 |
144 | 144 |
145 finish_test | 145 finish_test |
146 | |
OLD | NEW |