Lines Matching defs:iFrame

55438 /* Move the write position of the WAL back to iFrame.  Called in
58534 u32 iFrame = 0; /* Frame of WAL containing pgno */
58540 rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
58543 if( iFrame ){
58544 rc = sqlite3WalReadFrame(pPager->pWal, iFrame,pPager->pageSize,pPg->pData);
61167 u32 iFrame = 0; /* Frame to read from WAL file */
61195 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
61201 if( bMmapOk && iFrame==0 ){
63855 ** Return the offset of frame iFrame in the write-ahead log file,
63859 #define walFrameOffset(iFrame, szPage) ( \
63860 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
64394 ** iFrame. The wal-index is broken up into 32KB pages. Wal-index pages
64397 static int walFramePage(u32 iFrame){
64398 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
64399 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
64400 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
64401 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
64402 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
64403 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
64410 ** Return the page number associated with frame iFrame in this WAL.
64412 static u32 walFramePgno(Wal *pWal, u32 iFrame){
64413 int iHash = walFramePage(iFrame);
64415 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
64417 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
64492 ** pPage into WAL frame iFrame.
64494 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
64498 rc = walHashGet(pWal, walFramePage(iFrame), &sLoc);
64508 idx = iFrame - sLoc.iZero;
64684 u32 iFrame; /* Index of last frame read */
64693 for(iFrame=iFirst; iFrame<=iLast; iFrame++){
64694 i64 iOffset = walFrameOffset(iFrame, szPage);
64703 rc = walIndexAppend(pWal, iFrame, pgno);
64708 pWal->hdr.mxFrame = iFrame;
64748 if( iFrame<=iLast ) break;
65411 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
65491 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
65493 assert( walFramePgno(pWal, iFrame)==iDbpage );
65498 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){
65501 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
66546 ** (aPgno[iFrame]==pgno):
66549 ** (iFrame<=iLast):
66568 u32 iFrame = iH + sLoc.iZero;
66569 if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH-1]==pgno ){
66570 assert( iFrame>iRead || CORRUPT_DB );
66571 iRead = iFrame;
66723 Pgno iFrame;
66730 for(iFrame=pWal->hdr.mxFrame+1;
66731 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
66732 iFrame++
66745 assert( walFramePgno(pWal, iFrame)!=1 );
66746 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
66990 u32 iFrame; /* Next frame address */
67030 iFrame = pWal->hdr.mxFrame;
67031 if( iFrame==0 ){
67077 iOffset = walFrameOffset(iFrame+1, szPage);
67110 iFrame++;
67111 assert( iOffset==walFrameOffset(iFrame, szPage) );
67122 rc = walRewriteChecksums(pWal, iFrame);
67167 if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){
67168 sz = walFrameOffset(iFrame+nExtra+1, szPage);
67179 iFrame = pWal->hdr.mxFrame;
67182 iFrame++;
67183 rc = walIndexAppend(pWal, iFrame, p->pgno);
67187 iFrame++;
67189 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
67197 pWal->hdr.mxFrame = iFrame;
67205 pWal->iCallback = iFrame;
211899 u32 iFrame;
211916 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
211917 if( pRbu->iMaxFrame<iFrame ) pRbu->iMaxFrame = iFrame;
211918 pRbu->aFrame[pRbu->nFrame].iWalFrame = iFrame;