| OLD | NEW |
| 1 # 2005 January 19 | 1 # 2005 January 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 BEGIN; | 83 BEGIN; |
| 84 INSERT INTO t1 VALUES(10, randomblob(5000)) | 84 INSERT INTO t1 VALUES(10, randomblob(5000)) |
| 85 } db1 | 85 } db1 |
| 86 catchsql {select count(*) from sqlite_master} db3 | 86 catchsql {select count(*) from sqlite_master} db3 |
| 87 } {0 1} | 87 } {0 1} |
| 88 do_test shared3-2.8 { | 88 do_test shared3-2.8 { |
| 89 db3 close | 89 db3 close |
| 90 execsql { | 90 execsql { |
| 91 INSERT INTO t1 VALUES(10, randomblob(10000)) | 91 INSERT INTO t1 VALUES(10, randomblob(10000)) |
| 92 } db1 | 92 } db1 |
| 93 sqlite3 db3 $alternative_name | |
| 94 | 93 |
| 95 # If the pager-cache is really still limited to 10 pages, then the INSERT | 94 # If the pager-cache is really still limited to 10 pages, then the INSERT |
| 96 # statement above should have caused the pager to grab an exclusive lock | 95 # statement above should have caused the pager to grab an exclusive lock |
| 97 # on the database file so that the cache could be spilled. | 96 # on the database file so that the cache could be spilled. |
| 98 # | 97 # |
| 98 catch { sqlite3 db3 $alternative_name } |
| 99 catchsql {select count(*) from sqlite_master} db3 | 99 catchsql {select count(*) from sqlite_master} db3 |
| 100 } {1 {database is locked}} | 100 } {1 {database is locked}} |
| 101 | 101 |
| 102 db1 close | 102 db1 close |
| 103 db2 close | 103 db2 close |
| 104 db3 close | 104 db3 close |
| 105 | 105 |
| 106 sqlite3_enable_shared_cache $::enable_shared_cache | 106 sqlite3_enable_shared_cache $::enable_shared_cache |
| 107 finish_test | 107 finish_test |
| OLD | NEW |