OLD | NEW |
1 # 2007 April 6 | 1 # 2007 April 6 |
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 #*********************************************************************** |
11 # This file implements regression tests for SQLite library. The | 11 # This file implements regression tests for SQLite library. The |
12 # focus of this script is database locks. | 12 # focus of this script is database locks. |
13 # | 13 # |
14 # $Id: lock4.test,v 1.10 2009/05/06 00:52:41 drh Exp $ | 14 # $Id: lock4.test,v 1.10 2009/05/06 00:52:41 drh Exp $ |
15 | 15 |
16 | 16 |
17 set testdir [file dirname $argv0] | 17 set testdir [file dirname $argv0] |
18 source $testdir/tester.tcl | 18 source $testdir/tester.tcl |
19 | 19 |
20 do_not_use_codec | 20 do_not_use_codec |
21 | 21 |
22 # Initialize the test.db database so that it is non-empty | 22 # Initialize the test.db database so that it is non-empty |
23 # | 23 # |
24 do_test lock4-1.1 { | 24 do_test lock4-1.1 { |
25 db eval { | 25 db eval { |
26 PRAGMA auto_vacuum=OFF; | 26 PRAGMA auto_vacuum=OFF; |
27 CREATE TABLE t1(x); | 27 CREATE TABLE t1(x); |
28 } | 28 } |
29 file delete -force test2.db test2.db-journal | 29 forcedelete test2.db test2.db-journal |
30 sqlite3 db2 test2.db | 30 sqlite3 db2 test2.db |
31 db2 eval { | 31 db2 eval { |
32 PRAGMA auto_vacuum=OFF; | 32 PRAGMA auto_vacuum=OFF; |
33 CREATE TABLE t2(x) | 33 CREATE TABLE t2(x) |
34 } | 34 } |
35 db2 close | 35 db2 close |
36 list [file size test.db] [file size test2.db] | 36 list [file size test.db] [file size test2.db] |
37 } {2048 2048} | 37 } {2048 2048} |
38 | 38 |
39 # Create a script to drive a separate process that will | 39 # Create a script to drive a separate process that will |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 SELECT * FROM t2 | 109 SELECT * FROM t2 |
110 } | 110 } |
111 } {2} | 111 } {2} |
112 | 112 |
113 | 113 |
114 do_test lock4-999.1 { | 114 do_test lock4-999.1 { |
115 rename db2 {} | 115 rename db2 {} |
116 } {} | 116 } {} |
117 | 117 |
118 finish_test | 118 finish_test |
OLD | NEW |