** Perform one step (sqlite3_recover_step()) of work for the connection ** passed as the only argument, which is guaranteed to be in ** RECOVER_STATE_LOSTANDFOUND3 state - during which the lost-and-found ** table of the output database is populated with recovered data that can ** not be assigned to any recovered schema object. */
| 15056 | ** not be assigned to any recovered schema object. |
| 15057 | */ |
| 15058 | static int recoverLostAndFound3Step(sqlite3_recover *p){ |
| 15059 | RecoverStateLAF *pLaf = &p->laf; |
| 15060 | if( p->errCode==SQLITE_OK ){ |
| 15061 | if( pLaf->pInsert==0 ){ |
| 15062 | return SQLITE_DONE; |
| 15063 | }else{ |
| 15064 | if( p->errCode==SQLITE_OK ){ |
| 15065 | int res = sqlite3_step(pLaf->pAllPage); |
| 15066 | if( res==SQLITE_ROW ){ |
| 15067 | i64 iPage = sqlite3_column_int64(pLaf->pAllPage, 0); |
| 15068 | if( recoverBitmapQuery(pLaf->pUsed, iPage)==0 ){ |
| 15069 | recoverLostAndFoundOnePage(p, iPage); |
| 15070 | } |
| 15071 | }else{ |
| 15072 | recoverReset(p, pLaf->pAllPage); |
| 15073 | return SQLITE_DONE; |
| 15074 | } |
| 15075 | } |
| 15076 | } |
| 15077 | } |
| 15078 | return SQLITE_OK; |
| 15079 | } |
| 15080 | |
| 15081 | /* |
| 15082 | ** Initialize resources required in RECOVER_STATE_LOSTANDFOUND3 |
no test coverage detected