Lines Matching refs:pLaf
14094 RecoverStateLAF *pLaf = &p->laf;
14096 if( pLaf->pFindRoot==0 ){
14097 pLaf->pFindRoot = recoverPrepare(p, p->dbOut,
14108 sqlite3_bind_int64(pLaf->pFindRoot, 1, iPg);
14109 if( sqlite3_step(pLaf->pFindRoot)==SQLITE_ROW ){
14110 *piRoot = sqlite3_column_int64(pLaf->pFindRoot, 0);
14114 recoverReset(p, pLaf->pFindRoot);
14124 RecoverStateLAF *pLaf = &p->laf;
14125 sqlite3_value **apVal = pLaf->apVal;
14126 sqlite3_stmt *pPageData = pLaf->pPageData;
14127 sqlite3_stmt *pInsert = pLaf->pInsert;
14175 }else if( iField<pLaf->nMaxField ){
14203 RecoverStateLAF *pLaf = &p->laf;
14205 if( pLaf->pInsert==0 ){
14209 int res = sqlite3_step(pLaf->pAllPage);
14211 i64 iPage = sqlite3_column_int64(pLaf->pAllPage, 0);
14212 if( recoverBitmapQuery(pLaf->pUsed, iPage)==0 ){
14216 recoverReset(p, pLaf->pAllPage);
14232 RecoverStateLAF *pLaf = &p->laf;
14234 if( pLaf->nMaxField>0 ){
14237 zTab = recoverLostAndFoundCreate(p, pLaf->nMaxField);
14238 pLaf->pInsert = recoverLostAndFoundInsert(p, zTab, pLaf->nMaxField);
14241 pLaf->pAllPage = recoverPreparePrintf(p, p->dbOut,
14247 pLaf->pPageData = recoverPrepare(p, p->dbOut,
14254 pLaf->apVal = (sqlite3_value**)recoverMalloc(p,
14255 pLaf->nMaxField*sizeof(sqlite3_value*)
14455 RecoverStateLAF *pLaf = &p->laf;
14459 pLaf->nPg = recoverPageCount(p);
14460 pLaf->pUsed = recoverBitmapAlloc(p, pLaf->nPg);
14497 pLaf->pUsedPages = pStmt;
14507 RecoverStateLAF *pLaf = &p->laf;
14510 rc = sqlite3_step(pLaf->pUsedPages);
14512 i64 iPg = sqlite3_column_int64(pLaf->pUsedPages, 0);
14513 recoverBitmapSet(pLaf->pUsed, iPg);
14516 recoverFinalize(p, pLaf->pUsedPages);
14517 pLaf->pUsedPages = 0;
14529 RecoverStateLAF *pLaf = &p->laf;
14536 pLaf->pMapInsert = recoverPrepare(p, p->dbOut,
14539 pLaf->pAllAndParent = recoverPreparePrintf(p, p->dbOut,
14547 pLaf->pMaxField = recoverPreparePrintf(p, p->dbOut,
14560 RecoverStateLAF *pLaf = &p->laf;
14562 int res = sqlite3_step(pLaf->pAllAndParent);
14564 i64 iChild = sqlite3_column_int(pLaf->pAllAndParent, 1);
14565 if( recoverBitmapQuery(pLaf->pUsed, iChild)==0 ){
14566 sqlite3_bind_int64(pLaf->pMapInsert, 1, iChild);
14567 sqlite3_bind_value(pLaf->pMapInsert, 2,
14568 sqlite3_column_value(pLaf->pAllAndParent, 0)
14570 sqlite3_step(pLaf->pMapInsert);
14571 recoverReset(p, pLaf->pMapInsert);
14572 sqlite3_bind_int64(pLaf->pMaxField, 1, iChild);
14573 if( SQLITE_ROW==sqlite3_step(pLaf->pMaxField) ){
14574 int nMax = sqlite3_column_int(pLaf->pMaxField, 0);
14575 if( nMax>pLaf->nMaxField ) pLaf->nMaxField = nMax;
14577 recoverReset(p, pLaf->pMaxField);
14580 recoverFinalize(p, pLaf->pAllAndParent);
14581 pLaf->pAllAndParent =0;