mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Enable the use of shared cache for an in-memory database, so that separate
database connections can share the same in-memory database. FossilOrigin-Name: 4590e433f2a595bb80fb061024b0a3d2ca25b7b2
This commit is contained in:
@@ -4360,6 +4360,8 @@ int sqlite3PagerOpen(
|
||||
#ifndef SQLITE_OMIT_MEMORYDB
|
||||
if( flags & PAGER_MEMORY ){
|
||||
memDb = 1;
|
||||
zPathname = sqlite3DbStrDup(0, zFilename);
|
||||
nPathname = sqlite3Strlen30(zPathname);
|
||||
zFilename = 0;
|
||||
}
|
||||
#endif
|
||||
@@ -6743,7 +6745,8 @@ int sqlite3PagerWalCallback(Pager *pPager){
|
||||
*/
|
||||
int sqlite3PagerWalSupported(Pager *pPager){
|
||||
const sqlite3_io_methods *pMethods = pPager->fd->pMethods;
|
||||
return pPager->exclusiveMode || (pMethods->iVersion>=2 && pMethods->xShmMap);
|
||||
return pPager->memDb==0 &&
|
||||
(pPager->exclusiveMode || (pMethods->iVersion>=2 && pMethods->xShmMap));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user