OLD | NEW |
1 # 2009 March 11 | 1 # 2009 March 11 |
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 # but it would have no effect on the database contents. | 114 # but it would have no effect on the database contents. |
115 # | 115 # |
116 # Note that it has so far only proved possible to hit this race-condition | 116 # Note that it has so far only proved possible to hit this race-condition |
117 # when using an ATTACHed database. There doesn't seem to be any reason | 117 # when using an ATTACHed database. There doesn't seem to be any reason |
118 # for this, other than that operating on an ATTACHed database means there | 118 # for this, other than that operating on an ATTACHed database means there |
119 # are a few more mutex grabs and releases during the window of time open | 119 # are a few more mutex grabs and releases during the window of time open |
120 # for the race-condition. Maybe this encourages the scheduler to context | 120 # for the race-condition. Maybe this encourages the scheduler to context |
121 # switch or something... | 121 # switch or something... |
122 # | 122 # |
123 | 123 |
124 file delete -force test.db test2.db | 124 forcedelete test.db test2.db |
125 unset -nocomplain finished | 125 unset -nocomplain finished |
126 | 126 |
127 do_test thread005-2.1 { | 127 do_test thread005-2.1 { |
128 sqlite3 db test.db | 128 sqlite3 db test.db |
129 execsql { ATTACH 'test2.db' AS aux } | 129 execsql { ATTACH 'test2.db' AS aux } |
130 execsql { | 130 execsql { |
131 CREATE TABLE aux.t1(a INTEGER PRIMARY KEY, b UNIQUE); | 131 CREATE TABLE aux.t1(a INTEGER PRIMARY KEY, b UNIQUE); |
132 INSERT INTO t1 VALUES(1, 1); | 132 INSERT INTO t1 VALUES(1, 1); |
133 INSERT INTO t1 VALUES(2, 2); | 133 INSERT INTO t1 VALUES(2, 2); |
134 } | 134 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } {ok ok} | 229 } {ok ok} |
230 | 230 |
231 do_test thread005-2.3 { | 231 do_test thread005-2.3 { |
232 sqlite3 db test.db | 232 sqlite3 db test.db |
233 execsql { ATTACH 'test2.db' AS aux } | 233 execsql { ATTACH 'test2.db' AS aux } |
234 execsql { SELECT count(*) FROM t1 WHERE b IS NULL } | 234 execsql { SELECT count(*) FROM t1 WHERE b IS NULL } |
235 } {0} | 235 } {0} |
236 | 236 |
237 sqlite3_enable_shared_cache $::enable_shared_cache | 237 sqlite3_enable_shared_cache $::enable_shared_cache |
238 finish_test | 238 finish_test |
OLD | NEW |