aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/memdb.c7
-rw-r--r--src/pager.c6
-rw-r--r--src/sqliteInt.h3
3 files changed, 15 insertions, 1 deletions
diff --git a/src/memdb.c b/src/memdb.c
index 31b2324b9..0aecb7102 100644
--- a/src/memdb.c
+++ b/src/memdb.c
@@ -857,6 +857,13 @@ end_deserialize:
return rc;
}
+/*
+** Return true if the VFS is the memvfs.
+*/
+int sqlite3IsMemdb(const sqlite3_vfs *pVfs){
+ return pVfs==&memdb_vfs;
+}
+
/*
** This routine is called when the extension is loaded.
** Register the new VFS.
diff --git a/src/pager.c b/src/pager.c
index 883e6532c..c859f5028 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -7009,7 +7009,11 @@ int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
*/
const char *sqlite3PagerFilename(const Pager *pPager, int nullIfMemDb){
static const char zFake[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
- return (nullIfMemDb && pPager->memDb) ? &zFake[4] : pPager->zFilename;
+ if( nullIfMemDb && (pPager->memDb || sqlite3IsMemdb(pPager->pVfs)) ){
+ return &zFake[4];
+ }else{
+ return pPager->zFilename;
+ }
}
/*
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index e4b74f6d0..469ce9bba 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -5003,6 +5003,9 @@ const char *sqlite3ErrName(int);
#ifndef SQLITE_OMIT_DESERIALIZE
int sqlite3MemdbInit(void);
+int sqlite3IsMemdb(const sqlite3_vfs*);
+#else
+# define sqlite3IsMemdb(X) 0
#endif
const char *sqlite3ErrStr(int);