** Install the VFS wrapper around the file-descriptor open on the input ** database for recover handle p. Mutex RECOVER_MUTEX_ID must be held ** when this function is called. */
| 15999 | ** when this function is called. |
| 16000 | */ |
| 16001 | static void recoverInstallWrapper(sqlite3_recover *p){ |
| 16002 | sqlite3_file *pFd = 0; |
| 16003 | assert( recover_g.pMethods==0 ); |
| 16004 | recoverAssertMutexHeld(); |
| 16005 | sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_FILE_POINTER, (void*)&pFd); |
| 16006 | assert( pFd==0 || pFd->pMethods!=&recover_methods ); |
| 16007 | if( pFd && pFd->pMethods ){ |
| 16008 | int iVersion = 1 + (pFd->pMethods->iVersion>1 && pFd->pMethods->xShmMap!=0); |
| 16009 | recover_g.pMethods = pFd->pMethods; |
| 16010 | recover_g.p = p; |
| 16011 | recover_methods.iVersion = iVersion; |
| 16012 | pFd->pMethods = &recover_methods; |
| 16013 | } |
| 16014 | } |
| 16015 | |
| 16016 | /* |
| 16017 | ** Uninstall the VFS wrapper that was installed around the file-descriptor open |
no test coverage detected