diff options
author | danielk1977 <danielk1977@noemail.net> | 2007-09-17 07:02:56 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2007-09-17 07:02:56 +0000 |
commit | adfb9b0501e005d10aaec727fa56ed5beff0d7d0 (patch) | |
tree | 5ab83d741a99c37bae56a628f154647193bded56 /src/btree.c | |
parent | 76ee37f9bb393e45eaf724921853668960b34294 (diff) | |
download | sqlite-adfb9b0501e005d10aaec727fa56ed5beff0d7d0.tar.gz sqlite-adfb9b0501e005d10aaec727fa56ed5beff0d7d0.zip |
Add a parameter to specify the size of the output buffer passed to xGetTempname() and xFullPathname(). This, and the previous commit, are changes to the public vfs API introduced in 3.5.0. (CVS 4433)
FossilOrigin-Name: 8b29f5fbfc723cdf67cf3410cd01f7c17ea39a4b
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/btree.c b/src/btree.c index 4c38882ea..99147fb84 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.426 2007/09/12 17:01:45 danielk1977 Exp $ +** $Id: btree.c,v 1.427 2007/09/17 07:02:57 danielk1977 Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. @@ -1158,7 +1158,8 @@ int sqlite3BtreeOpen( && zFilename && zFilename[0] ){ if( sqlite3SharedCacheEnabled ){ - char *zFullPathname = (char *)sqlite3_malloc(pVfs->mxPathname); + int nFullPathname = pVfs->mxPathname+1; + char *zFullPathname = (char *)sqlite3_malloc(nFullPathname); sqlite3_mutex *mutexShared; p->sharable = 1; if( pSqlite ){ @@ -1168,7 +1169,7 @@ int sqlite3BtreeOpen( sqlite3_free(p); return SQLITE_NOMEM; } - sqlite3OsFullPathname(pVfs, zFilename, zFullPathname); + sqlite3OsFullPathname(pVfs, zFilename, nFullPathname, zFullPathname); mutexShared = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER); sqlite3_mutex_enter(mutexShared); for(pBt=sqlite3SharedCacheList; pBt; pBt=pBt->pNext){ |