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

Function recoverLostAndFound1Step

modules/dasSQLITE/sqlite/shell.c:15362–15377  ·  view source on GitHub ↗

** Perform one step (sqlite3_recover_step()) of work for the connection ** passed as the only argument, which is guaranteed to be in ** RECOVER_STATE_LOSTANDFOUND1 state - during which the set of pages not ** already allocated to a recovered schema element is determined. */

Source from the content-addressed store, hash-verified

15360** already allocated to a recovered schema element is determined.
15361*/
15362static int recoverLostAndFound1Step(sqlite3_recover *p){
15363 RecoverStateLAF *pLaf = &p->laf;
15364 int rc = p->errCode;
15365 if( rc==SQLITE_OK ){
15366 rc = sqlite3_step(pLaf->pUsedPages);
15367 if( rc==SQLITE_ROW ){
15368 i64 iPg = sqlite3_column_int64(pLaf->pUsedPages, 0);
15369 recoverBitmapSet(pLaf->pUsed, iPg);
15370 rc = SQLITE_OK;
15371 }else{
15372 recoverFinalize(p, pLaf->pUsedPages);
15373 pLaf->pUsedPages = 0;
15374 }
15375 }
15376 return rc;
15377}
15378
15379/*
15380** Initialize resources required by RECOVER_STATE_LOSTANDFOUND2

Callers 1

recoverStepFunction · 0.85

Calls 2

recoverBitmapSetFunction · 0.85
recoverFinalizeFunction · 0.85

Tested by

no test coverage detected