** 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. */
| 15360 | ** already allocated to a recovered schema element is determined. |
| 15361 | */ |
| 15362 | static 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 |
no test coverage detected