| OLD | NEW |
| 1 # 2007 December 20 | 1 # 2007 December 20 |
| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 execsql { COMMIT } db | 121 execsql { COMMIT } db |
| 122 } {} | 122 } {} |
| 123 do_test tkt2854-1.18 { | 123 do_test tkt2854-1.18 { |
| 124 execsql { SELECT * FROM abc } db2 | 124 execsql { SELECT * FROM abc } db2 |
| 125 } {} | 125 } {} |
| 126 | 126 |
| 127 # Check that if an attempt to obtain an exclusive lock fails because an | 127 # Check that if an attempt to obtain an exclusive lock fails because an |
| 128 # attached db cannot be locked, the internal exclusive flag used by | 128 # attached db cannot be locked, the internal exclusive flag used by |
| 129 # shared-cache users is correctly cleared. | 129 # shared-cache users is correctly cleared. |
| 130 do_test tkt2854-1.19 { | 130 do_test tkt2854-1.19 { |
| 131 file delete -force test2.db test2.db-journal | 131 forcedelete test2.db test2.db-journal |
| 132 sqlite3 db4 test2.db | 132 sqlite3 db4 test2.db |
| 133 execsql { CREATE TABLE def(d, e, f) } db4 | 133 execsql { CREATE TABLE def(d, e, f) } db4 |
| 134 execsql { ATTACH 'test2.db' AS aux } db | 134 execsql { ATTACH 'test2.db' AS aux } db |
| 135 } {} | 135 } {} |
| 136 do_test tkt2854-1.20 { | 136 do_test tkt2854-1.20 { |
| 137 execsql {BEGIN IMMEDIATE} db4 | 137 execsql {BEGIN IMMEDIATE} db4 |
| 138 catchsql {BEGIN EXCLUSIVE} db | 138 catchsql {BEGIN EXCLUSIVE} db |
| 139 } {1 {database table is locked}} | 139 } {1 {database table is locked}} |
| 140 do_test tkt2854-1.21 { | 140 do_test tkt2854-1.21 { |
| 141 execsql {SELECT * FROM abc} db2 | 141 execsql {SELECT * FROM abc} db2 |
| 142 } {} | 142 } {} |
| 143 | 143 |
| 144 db close | 144 db close |
| 145 db2 close | 145 db2 close |
| 146 db3 close | 146 db3 close |
| 147 db4 close | 147 db4 close |
| 148 sqlite3_enable_shared_cache $::enable_shared_cache | 148 sqlite3_enable_shared_cache $::enable_shared_cache |
| 149 finish_test | 149 finish_test |
| OLD | NEW |