Lines Matching refs:iFrame
54662 u32 iFrame = 0; /* Frame of WAL containing pgno */
54668 rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
54671 if( iFrame ){
54672 rc = sqlite3WalReadFrame(pPager->pWal, iFrame,pPager->pageSize,pPg->pData);
57271 u32 iFrame = 0; /* Frame to read from WAL file */
57296 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
57302 if( bMmapOk && iFrame==0 ){
59834 #define walFrameOffset(iFrame, szPage) ( \
59835 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
60365 static int walFramePage(u32 iFrame){
60366 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
60367 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
60368 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
60369 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
60370 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
60371 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
60380 static u32 walFramePgno(Wal *pWal, u32 iFrame){
60381 int iHash = walFramePage(iFrame);
60383 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
60385 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
60462 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
60466 rc = walHashGet(pWal, walFramePage(iFrame), &sLoc);
60476 idx = iFrame - sLoc.iZero;
60653 u32 iFrame; /* Index of last frame read */
60661 for(iFrame=iFirst; iFrame<=iLast; iFrame++){
60662 i64 iOffset = walFrameOffset(iFrame, szPage);
60671 rc = walIndexAppend(pWal, iFrame, pgno);
60676 pWal->hdr.mxFrame = iFrame;
60716 if( iFrame<=iLast ) break;
61349 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
61429 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
61431 assert( walFramePgno(pWal, iFrame)==iDbpage );
61436 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){
61439 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
62497 u32 iFrame = iH + sLoc.iZero;
62498 if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH]==pgno ){
62499 assert( iFrame>iRead || CORRUPT_DB );
62500 iRead = iFrame;
62652 Pgno iFrame;
62659 for(iFrame=pWal->hdr.mxFrame+1;
62660 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
62661 iFrame++
62674 assert( walFramePgno(pWal, iFrame)!=1 );
62675 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
62911 u32 iFrame; /* Next frame address */
62951 iFrame = pWal->hdr.mxFrame;
62952 if( iFrame==0 ){
62998 iOffset = walFrameOffset(iFrame+1, szPage);
63027 iFrame++;
63028 assert( iOffset==walFrameOffset(iFrame, szPage) );
63039 rc = walRewriteChecksums(pWal, iFrame);
63084 if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){
63085 sz = walFrameOffset(iFrame+nExtra+1, szPage);
63096 iFrame = pWal->hdr.mxFrame;
63099 iFrame++;
63100 rc = walIndexAppend(pWal, iFrame, p->pgno);
63104 iFrame++;
63106 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
63114 pWal->hdr.mxFrame = iFrame;
63122 pWal->iCallback = iFrame;
198923 u32 iFrame;
198940 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
198941 if( pRbu->iMaxFrame<iFrame ) pRbu->iMaxFrame = iFrame;
198942 pRbu->aFrame[pRbu->nFrame].iWalFrame = iFrame;