Lines Matching refs:iFrame

45922 static int readDbPage(PgHdr *pPg, u32 iFrame){
45932 if( iFrame ){
45934 rc = sqlite3WalReadFrame(pPager->pWal, iFrame, pgsz, pPg->pData);
46022 u32 iFrame = 0;
46023 rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
46025 rc = readDbPage(pPg, iFrame);
48290 u32 iFrame = 0; /* Frame to read from WAL file */
48323 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
48327 if( bMmapOk && iFrame==0 ){
48427 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
48432 rc = readDbPage(pPg, iFrame);
50721 #define walFrameOffset(iFrame, szPage) ( \
50722 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
51195 static int walFramePage(u32 iFrame){
51196 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
51197 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
51198 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
51199 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
51200 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
51201 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
51209 static u32 walFramePgno(Wal *pWal, u32 iFrame){
51210 int iHash = walFramePage(iFrame);
51212 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
51214 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
51291 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
51297 rc = walHashGet(pWal, walFramePage(iFrame), &aHash, &aPgno, &iZero);
51307 idx = iFrame - iZero;
51417 int iFrame; /* Index of last frame read */
51477 iFrame = 0;
51483 iFrame++;
51488 rc = walIndexAppend(pWal, iFrame, pgno);
51493 pWal->hdr.mxFrame = iFrame;
52025 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
52104 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
52106 assert( walFramePgno(pWal, iFrame)==iDbpage );
52107 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){
52110 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
52765 u32 iFrame = aHash[iKey] + iZero;
52766 if( iFrame<=iLast && iFrame>=pWal->minFrame && aPgno[aHash[iKey]]==pgno ){
52767 assert( iFrame>iRead || CORRUPT_DB );
52768 iRead = iFrame;
52906 Pgno iFrame;
52913 for(iFrame=pWal->hdr.mxFrame+1;
52914 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
52915 iFrame++
52928 assert( walFramePgno(pWal, iFrame)!=1 );
52929 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
53116 u32 iFrame; /* Next frame address */
53149 iFrame = pWal->hdr.mxFrame;
53150 if( iFrame==0 ){
53196 iOffset = walFrameOffset(iFrame+1, szPage);
53202 iFrame++;
53203 assert( iOffset==walFrameOffset(iFrame, szPage) );
53246 if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){
53247 sz = walFrameOffset(iFrame+nExtra+1, szPage);
53258 iFrame = pWal->hdr.mxFrame;
53260 iFrame++;
53261 rc = walIndexAppend(pWal, iFrame, p->pgno);
53264 iFrame++;
53266 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
53274 pWal->hdr.mxFrame = iFrame;
53282 pWal->iCallback = iFrame;
161140 u32 iFrame;
161157 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
161158 if( pRbu->iMaxFrame<iFrame ) pRbu->iMaxFrame = iFrame;
161159 pRbu->aFrame[pRbu->nFrame].iWalFrame = iFrame;