OLD | NEW |
1 # 2010 July 29 | 1 # 2010 July 29 |
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 # | 11 # |
12 | 12 |
13 set testdir [file dirname $argv0] | 13 set testdir [file dirname $argv0] |
14 source $testdir/tester.tcl | 14 source $testdir/tester.tcl |
15 source $testdir/malloc_common.tcl | 15 source $testdir/malloc_common.tcl |
16 | 16 |
17 foreach f [glob -nocomplain test.db*mj*] { file delete -force $f } | 17 foreach f [glob -nocomplain test.db*mj*] { forcedelete $f } |
18 file delete -force test.db2 | 18 forcedelete test.db2 |
19 | 19 |
20 do_test tkt-f3e5abed55-1.1 { | 20 do_test tkt-f3e5abed55-1.1 { |
21 execsql { | 21 execsql { |
22 ATTACH 'test.db2' AS aux; | 22 ATTACH 'test.db2' AS aux; |
23 CREATE TABLE main.t1(a, b); | 23 CREATE TABLE main.t1(a, b); |
24 CREATE TABLE aux.t2(c, d); | 24 CREATE TABLE aux.t2(c, d); |
25 } | 25 } |
26 } {} | 26 } {} |
27 | 27 |
28 do_test tkt-f3e5abed55-1.2 { | 28 do_test tkt-f3e5abed55-1.2 { |
(...skipping 15 matching lines...) Expand all Loading... |
44 } {1 {database is locked}} | 44 } {1 {database is locked}} |
45 | 45 |
46 do_test tkt-f3e5abed55-1.5 { | 46 do_test tkt-f3e5abed55-1.5 { |
47 execsql COMMIT db2 | 47 execsql COMMIT db2 |
48 execsql COMMIT | 48 execsql COMMIT |
49 } {} | 49 } {} |
50 | 50 |
51 do_test tkt-f3e5abed55-1.6 { | 51 do_test tkt-f3e5abed55-1.6 { |
52 glob -nocomplain test.db*mj* | 52 glob -nocomplain test.db*mj* |
53 } {} | 53 } {} |
54 foreach f [glob -nocomplain test.db*mj*] { file delete -force $f } | 54 foreach f [glob -nocomplain test.db*mj*] { forcedelete $f } |
55 db close | 55 db close |
56 db2 close | 56 db2 close |
57 | 57 |
58 | 58 |
59 | 59 |
60 # Set up a testvfs so that the next time SQLite tries to delete the | 60 # Set up a testvfs so that the next time SQLite tries to delete the |
61 # file "test.db-journal", a snapshot of the current file-system contents | 61 # file "test.db-journal", a snapshot of the current file-system contents |
62 # is taken. | 62 # is taken. |
63 # | 63 # |
64 # This test will not work with an in-memory journal. | 64 # This test will not work with an in-memory journal. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 execsql { | 107 execsql { |
108 ATTACH 'test.db2' AS aux; | 108 ATTACH 'test.db2' AS aux; |
109 SELECT * FROM t1; | 109 SELECT * FROM t1; |
110 SELECT * FROM t2; | 110 SELECT * FROM t2; |
111 } | 111 } |
112 } {1 2 3 4 1 2 3 4} | 112 } {1 2 3 4 1 2 3 4} |
113 } | 113 } |
114 | 114 |
115 | 115 |
116 finish_test | 116 finish_test |
117 | |
OLD | NEW |