Index: third_party/sqlite/src/test/attachmalloc.test |
diff --git a/third_party/sqlite/src/test/attachmalloc.test b/third_party/sqlite/src/test/attachmalloc.test |
index 30841cea76f797dd7baace70c9c8aa3b4ba2844e..c485c618bd4c5917bb310a93afbfa12788cf3d0c 100644 |
--- a/third_party/sqlite/src/test/attachmalloc.test |
+++ b/third_party/sqlite/src/test/attachmalloc.test |
@@ -26,8 +26,9 @@ ifcapable !memdebug||!attach { |
source $testdir/malloc_common.tcl |
do_malloc_test attachmalloc-1 -tclprep { |
- db close |
+ catch { db close } |
for {set i 2} {$i<=4} {incr i} { |
+ catch { db$i close } |
file delete -force test$i.db |
file delete -force test$i.db-journal |
} |
@@ -60,4 +61,17 @@ do_malloc_test attachmalloc-2 -tclprep { |
ATTACH 'test2.db' AS db1; |
} |
+set enable_shared_cache [sqlite3_enable_shared_cache 1] |
+sqlite3 dbaux test3.db |
+dbaux eval {SELECT * FROM sqlite_master} |
+do_malloc_test attachmalloc-3 -sqlbody { |
+ SELECT * FROM sqlite_master; |
+ ATTACH 'test3.db' AS three; |
+} -cleanup { |
+ db eval { DETACH three } |
+} |
+dbaux close |
+sqlite3_enable_shared_cache $enable_shared_cache |
+ |
+ |
finish_test |