1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix another problem to do with recovering from in-memory databases.

FossilOrigin-Name: 5a7bfd4a217cd80882a1827674b479cdc547419a785e06e0ee82cb8cfca42701
This commit is contained in:
dan
2022-10-27 19:06:42 +00:00
parent ac16a4716b
commit 10f5525410
3 changed files with 9 additions and 9 deletions

View File

@ -2497,7 +2497,7 @@ static void recoverInstallWrapper(sqlite3_recover *p){
recoverAssertMutexHeld();
sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_FILE_POINTER, (void*)&pFd);
assert( pFd==0 || pFd->pMethods!=&recover_methods );
if( pFd ){
if( pFd && pFd->pMethods ){
int iVersion = 1 + (pFd->pMethods->iVersion>1 && pFd->pMethods->xShmMap!=0);
recover_g.pMethods = pFd->pMethods;
recover_g.p = p;
@ -2515,7 +2515,7 @@ static void recoverUninstallWrapper(sqlite3_recover *p){
recoverAssertMutexHeld();
sqlite3_file *pFd = 0;
sqlite3_file_control(p->dbIn, p->zDb,SQLITE_FCNTL_FILE_POINTER,(void*)&pFd);
if( pFd ){
if( pFd && pFd->pMethods ){
pFd->pMethods = recover_g.pMethods;
recover_g.pMethods = 0;
recover_g.p = 0;