aboutsummaryrefslogtreecommitdiff
path: root/src/btree.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-08-23 02:47:53 +0000
committerdrh <drh@noemail.net>2007-08-23 02:47:53 +0000
commit4a50aac5645b7dffed2c27e552675fa4be3a9368 (patch)
tree8a197bbd8fca21cf558ae84e510efd8168fe72c2 /src/btree.c
parented138fb3bc8e55a6ae93669899dce79e5e26c65a (diff)
downloadsqlite-4a50aac5645b7dffed2c27e552675fa4be3a9368.tar.gz
sqlite-4a50aac5645b7dffed2c27e552675fa4be3a9368.zip
Improvements to memory leak detection. The --backtrace=NNN option is now
recognized by tester.tcl. Memory leak summaries are automatically written to the file ./memleak.txt and each leak is tagged with the test in which it occurred. The quick.test script runs on Linux with no errors and no leaks. (CVS 4273) FossilOrigin-Name: 21f6b31097692171c6493e6ca6de6acbd62dc595
Diffstat (limited to 'src/btree.c')
-rw-r--r--src/btree.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index f92e32cc5..bb740a74f 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.409 2007/08/22 11:41:18 drh Exp $
+** $Id: btree.c,v 1.410 2007/08/23 02:47:53 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -1136,12 +1136,16 @@ int sqlite3BtreeOpen(
*/
if( (flags & BTREE_PRIVATE)==0
&& isMemdb==0
+ && (pSqlite==0 || (pSqlite->flags &SQLITE_Vtab)==0)
&& zFilename && zFilename[0]
&& sqlite3SharedCacheEnabled
){
char *zFullPathname = (char *)sqlite3_malloc(pVfs->mxPathname);
sqlite3_mutex *mutexShared;
p->sharable = 1;
+ if( pSqlite ){
+ pSqlite->flags |= SQLITE_SharedCache;
+ }
if( !zFullPathname ){
sqlite3_free(p);
return SQLITE_NOMEM;