Lines Matching refs:iFrame
50985 u32 iFrame = 0; /* Frame of WAL containing pgno */
50991 rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
50994 if( iFrame ){
50995 rc = sqlite3WalReadFrame(pPager->pWal, iFrame,pPager->pageSize,pPg->pData);
53503 u32 iFrame = 0; /* Frame to read from WAL file */
53531 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
53537 if( bMmapOk && iFrame==0 ){
56032 #define walFrameOffset(iFrame, szPage) ( \
56033 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
56523 static int walFramePage(u32 iFrame){
56524 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
56525 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
56526 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
56527 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
56528 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
56529 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
56537 static u32 walFramePgno(Wal *pWal, u32 iFrame){
56538 int iHash = walFramePage(iFrame);
56540 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
56542 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
56619 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
56625 rc = walHashGet(pWal, walFramePage(iFrame), &aHash, &aPgno, &iZero);
56635 idx = iFrame - iZero;
56750 int iFrame; /* Index of last frame read */
56810 iFrame = 0;
56816 iFrame++;
56821 rc = walIndexAppend(pWal, iFrame, pgno);
56826 pWal->hdr.mxFrame = iFrame;
57367 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
57446 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
57448 assert( walFramePgno(pWal, iFrame)==iDbpage );
57453 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){
57456 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
58486 u32 iFrame = aHash[iKey] + iZero;
58487 if( iFrame<=iLast && iFrame>=pWal->minFrame && aPgno[aHash[iKey]]==pgno ){
58488 assert( iFrame>iRead || CORRUPT_DB );
58489 iRead = iFrame;
58629 Pgno iFrame;
58636 for(iFrame=pWal->hdr.mxFrame+1;
58637 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
58638 iFrame++
58651 assert( walFramePgno(pWal, iFrame)!=1 );
58652 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
58892 u32 iFrame; /* Next frame address */
58932 iFrame = pWal->hdr.mxFrame;
58933 if( iFrame==0 ){
58979 iOffset = walFrameOffset(iFrame+1, szPage);
59012 iFrame++;
59013 assert( iOffset==walFrameOffset(iFrame, szPage) );
59024 rc = walRewriteChecksums(pWal, iFrame);
59068 if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){
59069 sz = walFrameOffset(iFrame+nExtra+1, szPage);
59080 iFrame = pWal->hdr.mxFrame;
59083 iFrame++;
59084 rc = walIndexAppend(pWal, iFrame, p->pgno);
59087 iFrame++;
59089 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
59097 pWal->hdr.mxFrame = iFrame;
59105 pWal->iCallback = iFrame;
175400 u32 iFrame;
175417 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
175418 if( pRbu->iMaxFrame<iFrame ) pRbu->iMaxFrame = iFrame;
175419 pRbu->aFrame[pRbu->nFrame].iWalFrame = iFrame;