Lines Matching refs:iFrame
54594 u32 iFrame = 0; /* Frame of WAL containing pgno */
54600 rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
54603 if( iFrame ){
54604 rc = sqlite3WalReadFrame(pPager->pWal, iFrame,pPager->pageSize,pPg->pData);
57203 u32 iFrame = 0; /* Frame to read from WAL file */
57228 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
57234 if( bMmapOk && iFrame==0 ){
59766 #define walFrameOffset(iFrame, szPage) ( \
59767 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
60295 static int walFramePage(u32 iFrame){
60296 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
60297 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
60298 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
60299 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
60300 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
60301 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
60309 static u32 walFramePgno(Wal *pWal, u32 iFrame){
60310 int iHash = walFramePage(iFrame);
60312 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
60314 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
60391 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
60395 rc = walHashGet(pWal, walFramePage(iFrame), &sLoc);
60405 idx = iFrame - sLoc.iZero;
60523 int iFrame; /* Index of last frame read */
60583 iFrame = 0;
60589 iFrame++;
60594 rc = walIndexAppend(pWal, iFrame, pgno);
60599 pWal->hdr.mxFrame = iFrame;
61229 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
61301 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
61303 assert( walFramePgno(pWal, iFrame)==iDbpage );
61308 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){
61311 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
62369 u32 iFrame = iH + sLoc.iZero;
62370 if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH]==pgno ){
62371 assert( iFrame>iRead || CORRUPT_DB );
62372 iRead = iFrame;
62524 Pgno iFrame;
62531 for(iFrame=pWal->hdr.mxFrame+1;
62532 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
62533 iFrame++
62546 assert( walFramePgno(pWal, iFrame)!=1 );
62547 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
62783 u32 iFrame; /* Next frame address */
62823 iFrame = pWal->hdr.mxFrame;
62824 if( iFrame==0 ){
62870 iOffset = walFrameOffset(iFrame+1, szPage);
62899 iFrame++;
62900 assert( iOffset==walFrameOffset(iFrame, szPage) );
62911 rc = walRewriteChecksums(pWal, iFrame);
62956 if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){
62957 sz = walFrameOffset(iFrame+nExtra+1, szPage);
62968 iFrame = pWal->hdr.mxFrame;
62971 iFrame++;
62972 rc = walIndexAppend(pWal, iFrame, p->pgno);
62976 iFrame++;
62978 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
62986 pWal->hdr.mxFrame = iFrame;
62994 pWal->iCallback = iFrame;
198190 u32 iFrame;
198207 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
198208 if( pRbu->iMaxFrame<iFrame ) pRbu->iMaxFrame = iFrame;
198209 pRbu->aFrame[pRbu->nFrame].iWalFrame = iFrame;