OLD | NEW |
1 # 2010 April 19 | 1 # 2010 April 19 |
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 } [list $mode wal] | 288 } [list $mode wal] |
289 } | 289 } |
290 db close | 290 db close |
291 | 291 |
292 #------------------------------------------------------------------------- | 292 #------------------------------------------------------------------------- |
293 # Test the effect of a "PRAGMA journal_mode" command being the first | 293 # Test the effect of a "PRAGMA journal_mode" command being the first |
294 # thing executed by a new connection. This means that the schema is not | 294 # thing executed by a new connection. This means that the schema is not |
295 # loaded when sqlite3_prepare_v2() is called to compile the statement. | 295 # loaded when sqlite3_prepare_v2() is called to compile the statement. |
296 # | 296 # |
297 do_test walmode-7.0 { | 297 do_test walmode-7.0 { |
298 file delete -force test.db | 298 forcedelete test.db |
299 sqlite3 db test.db | 299 sqlite3 db test.db |
300 execsql { | 300 execsql { |
301 PRAGMA journal_mode = WAL; | 301 PRAGMA journal_mode = WAL; |
302 CREATE TABLE t1(a, b); | 302 CREATE TABLE t1(a, b); |
303 } | 303 } |
304 } {wal} | 304 } {wal} |
305 foreach {tn sql result} { | 305 foreach {tn sql result} { |
306 1 "PRAGMA journal_mode" wal | 306 1 "PRAGMA journal_mode" wal |
307 2 "PRAGMA main.journal_mode" wal | 307 2 "PRAGMA main.journal_mode" wal |
308 3 "PRAGMA journal_mode = delete" delete | 308 3 "PRAGMA journal_mode = delete" delete |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 db2 close | 378 db2 close |
379 | 379 |
380 do_execsql_test walmode-8.20 { PRAGMA journal_mode = DELETE } {delete} | 380 do_execsql_test walmode-8.20 { PRAGMA journal_mode = DELETE } {delete} |
381 do_execsql_test walmode-8.21 { PRAGMA main.journal_mode } {delete} | 381 do_execsql_test walmode-8.21 { PRAGMA main.journal_mode } {delete} |
382 do_execsql_test walmode-8.22 { PRAGMA two.journal_mode } {delete} | 382 do_execsql_test walmode-8.22 { PRAGMA two.journal_mode } {delete} |
383 do_execsql_test walmode-8.21 { PRAGMA journal_mode = WAL } {wal} | 383 do_execsql_test walmode-8.21 { PRAGMA journal_mode = WAL } {wal} |
384 do_execsql_test walmode-8.21 { PRAGMA main.journal_mode } {wal} | 384 do_execsql_test walmode-8.21 { PRAGMA main.journal_mode } {wal} |
385 do_execsql_test walmode-8.22 { PRAGMA two.journal_mode } {wal} | 385 do_execsql_test walmode-8.22 { PRAGMA two.journal_mode } {wal} |
386 | 386 |
387 finish_test | 387 finish_test |
OLD | NEW |