Lines Matching defs:iFrame

40220 /* Move the write position of the WAL back to iFrame.  Called in
43121 static int readDbPage(PgHdr *pPg, u32 iFrame){
43131 if( iFrame ){
43133 rc = sqlite3WalReadFrame(pPager->pWal, iFrame, pgsz, pPg->pData);
43221 u32 iFrame = 0;
43222 rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
43224 rc = readDbPage(pPg, iFrame);
45522 u32 iFrame = 0; /* Frame to read from WAL file */
45551 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
45555 if( bMmapOk && iFrame==0 ){
45641 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
45646 rc = readDbPage(pPg, iFrame);
47879 ** Return the offset of frame iFrame in the write-ahead log file,
47883 #define walFrameOffset(iFrame, szPage) ( \
47884 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
48352 ** iFrame. The wal-index is broken up into 32KB pages. Wal-index pages
48355 static int walFramePage(u32 iFrame){
48356 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
48357 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
48358 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
48359 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
48360 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
48361 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
48367 ** Return the page number associated with frame iFrame in this WAL.
48369 static u32 walFramePgno(Wal *pWal, u32 iFrame){
48370 int iHash = walFramePage(iFrame);
48372 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
48374 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
48449 ** pPage into WAL frame iFrame.
48451 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
48457 rc = walHashGet(pWal, walFramePage(iFrame), &aHash, &aPgno, &iZero);
48467 idx = iFrame - iZero;
48577 int iFrame; /* Index of last frame read */
48637 iFrame = 0;
48643 iFrame++;
48648 rc = walIndexAppend(pWal, iFrame, pgno);
48653 pWal->hdr.mxFrame = iFrame;
49149 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
49219 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
49221 assert( walFramePgno(pWal, iFrame)==iDbpage );
49222 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ) continue;
49223 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
49820 ** (aPgno[iFrame]==pgno):
49823 ** (iFrame<=iLast):
49841 u32 iFrame = aHash[iKey] + iZero;
49842 if( iFrame<=iLast && aPgno[aHash[iKey]]==pgno ){
49843 /* assert( iFrame>iRead ); -- not true if there is corruption */
49844 iRead = iFrame;
49981 Pgno iFrame;
49988 for(iFrame=pWal->hdr.mxFrame+1;
49989 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
49990 iFrame++
50003 assert( walFramePgno(pWal, iFrame)!=1 );
50004 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
50205 u32 iFrame; /* Next frame address */
50238 iFrame = pWal->hdr.mxFrame;
50239 if( iFrame==0 ){
50285 iOffset = walFrameOffset(iFrame+1, szPage);
50291 iFrame++;
50292 assert( iOffset==walFrameOffset(iFrame, szPage) );
50335 if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){
50336 sz = walFrameOffset(iFrame+nExtra+1, szPage);
50347 iFrame = pWal->hdr.mxFrame;
50349 iFrame++;
50350 rc = walIndexAppend(pWal, iFrame, p->pgno);
50353 iFrame++;
50355 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
50363 pWal->hdr.mxFrame = iFrame;
50371 pWal->iCallback = iFrame;