1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Databases created using sqlite3_deserialize() should report their filename

as an empty string, not as "x".  Fix for ticket [53043c9793715f08].

FossilOrigin-Name: ff494449efd475878c549728cc22ee9b12d13674068781747fc042a0c1bd09c8
This commit is contained in:
drh
2022-11-19 00:08:35 +00:00
parent 26e0f2e916
commit cf3107c7d4
5 changed files with 24 additions and 10 deletions

View File

@@ -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;
}
}
/*