Lines Matching refs:iFrame
45735 #define walFrameOffset(iFrame, szPage) ( \
45736 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
46207 static int walFramePage(u32 iFrame){
46208 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
46209 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
46210 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
46211 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
46212 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
46213 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
46221 static u32 walFramePgno(Wal *pWal, u32 iFrame){
46222 int iHash = walFramePage(iFrame);
46224 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
46226 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
46303 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
46309 rc = walHashGet(pWal, walFramePage(iFrame), &aHash, &aPgno, &iZero);
46319 idx = iFrame - iZero;
46429 int iFrame; /* Index of last frame read */
46489 iFrame = 0;
46495 iFrame++;
46500 rc = walIndexAppend(pWal, iFrame, pgno);
46505 pWal->hdr.mxFrame = iFrame;
46999 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
47068 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
47070 assert( walFramePgno(pWal, iFrame)==iDbpage );
47071 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ) continue;
47072 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
47692 u32 iFrame = aHash[iKey] + iZero;
47693 if( iFrame<=iLast && aPgno[aHash[iKey]]==pgno ){
47695 iRead = iFrame;
47827 Pgno iFrame;
47834 for(iFrame=pWal->hdr.mxFrame+1;
47835 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
47836 iFrame++
47849 assert( walFramePgno(pWal, iFrame)!=1 );
47850 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
48050 u32 iFrame; /* Next frame address */
48083 iFrame = pWal->hdr.mxFrame;
48084 if( iFrame==0 ){
48130 iOffset = walFrameOffset(iFrame+1, szPage);
48136 iFrame++;
48137 assert( iOffset==walFrameOffset(iFrame, szPage) );
48180 if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){
48181 sz = walFrameOffset(iFrame+nExtra+1, szPage);
48192 iFrame = pWal->hdr.mxFrame;
48194 iFrame++;
48195 rc = walIndexAppend(pWal, iFrame, p->pgno);
48198 iFrame++;
48200 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
48208 pWal->hdr.mxFrame = iFrame;
48216 pWal->iCallback = iFrame;