MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / recoverInstallWrapper

Function recoverInstallWrapper

modules/dasSQLITE/sqlite/shell.c:16001–16014  ·  view source on GitHub ↗

** 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. */

Source from the content-addressed store, hash-verified

15999** when this function is called.
16000*/
16001static 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

Callers 1

recoverStepFunction · 0.85

Calls 2

assertFunction · 0.85
recoverAssertMutexHeldFunction · 0.85

Tested by

no test coverage detected