Lines Matching refs:iFrame
54578 u32 iFrame = 0; /* Frame of WAL containing pgno */
54584 rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
54587 if( iFrame ){
54588 rc = sqlite3WalReadFrame(pPager->pWal, iFrame,pPager->pageSize,pPg->pData);
57187 u32 iFrame = 0; /* Frame to read from WAL file */
57212 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
57218 if( bMmapOk && iFrame==0 ){
59750 #define walFrameOffset(iFrame, szPage) ( \
59751 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
60279 static int walFramePage(u32 iFrame){
60280 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
60281 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
60282 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
60283 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
60284 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
60285 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
60293 static u32 walFramePgno(Wal *pWal, u32 iFrame){
60294 int iHash = walFramePage(iFrame);
60296 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
60298 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
60375 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
60379 rc = walHashGet(pWal, walFramePage(iFrame), &sLoc);
60389 idx = iFrame - sLoc.iZero;
60507 int iFrame; /* Index of last frame read */
60567 iFrame = 0;
60573 iFrame++;
60578 rc = walIndexAppend(pWal, iFrame, pgno);
60583 pWal->hdr.mxFrame = iFrame;
61213 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
61285 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
61287 assert( walFramePgno(pWal, iFrame)==iDbpage );
61292 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){
61295 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
62353 u32 iFrame = iH + sLoc.iZero;
62354 if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH]==pgno ){
62355 assert( iFrame>iRead || CORRUPT_DB );
62356 iRead = iFrame;
62508 Pgno iFrame;
62515 for(iFrame=pWal->hdr.mxFrame+1;
62516 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
62517 iFrame++
62530 assert( walFramePgno(pWal, iFrame)!=1 );
62531 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
62767 u32 iFrame; /* Next frame address */
62807 iFrame = pWal->hdr.mxFrame;
62808 if( iFrame==0 ){
62854 iOffset = walFrameOffset(iFrame+1, szPage);
62883 iFrame++;
62884 assert( iOffset==walFrameOffset(iFrame, szPage) );
62895 rc = walRewriteChecksums(pWal, iFrame);
62940 if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){
62941 sz = walFrameOffset(iFrame+nExtra+1, szPage);
62952 iFrame = pWal->hdr.mxFrame;
62955 iFrame++;
62956 rc = walIndexAppend(pWal, iFrame, p->pgno);
62960 iFrame++;
62962 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
62970 pWal->hdr.mxFrame = iFrame;
62978 pWal->iCallback = iFrame;
198162 u32 iFrame;
198179 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
198180 if( pRbu->iMaxFrame<iFrame ) pRbu->iMaxFrame = iFrame;
198181 pRbu->aFrame[pRbu->nFrame].iWalFrame = iFrame;