Lines Matching defs:iFrame

36411 /* Move the write position of the WAL back to iFrame.  Called in
43678 ** Return the offset of frame iFrame in the write-ahead log file,
43682 #define walFrameOffset(iFrame, szPage) ( \
43683 WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE) \
44134 ** iFrame. The wal-index is broken up into 32KB pages. Wal-index pages
44137 static int walFramePage(u32 iFrame){
44138 int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
44139 assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
44140 && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
44141 && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
44142 && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
44143 && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
44149 ** Return the page number associated with frame iFrame in this WAL.
44151 static u32 walFramePgno(Wal *pWal, u32 iFrame){
44152 int iHash = walFramePage(iFrame);
44154 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
44156 return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
44231 ** pPage into WAL frame iFrame.
44233 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
44239 rc = walHashGet(pWal, walFramePage(iFrame), &aHash, &aPgno, &iZero);
44249 idx = iFrame - iZero;
44359 int iFrame; /* Index of last frame read */
44418 iFrame = 0;
44429 rc = walIndexAppend(pWal, ++iFrame, pgno);
44434 pWal->hdr.mxFrame = iFrame;
44912 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
44981 while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
44983 assert( walFramePgno(pWal, iFrame)==iDbpage );
44984 if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ) continue;
44985 iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
45538 ** (aPgno[iFrame]==pgno):
45541 ** (iFrame<=iLast):
45559 u32 iFrame = aHash[iKey] + iZero;
45560 if( iFrame<=iLast && aPgno[aHash[iKey]]==pgno ){
45561 assert( iFrame>iRead );
45562 iRead = iFrame;
45693 Pgno iFrame;
45700 for(iFrame=pWal->hdr.mxFrame+1;
45701 ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;
45702 iFrame++
45715 assert( walFramePgno(pWal, iFrame)!=1 );
45716 rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
45846 u32 iFrame; /* Next frame address */
45873 iFrame = pWal->hdr.mxFrame;
45874 if( iFrame==0 ){
45907 iOffset = walFrameOffset(++iFrame, szPage);
45934 i64 iOffset = walFrameOffset(iFrame+1, szPage);
45970 iFrame = pWal->hdr.mxFrame;
45972 iFrame++;
45973 rc = walIndexAppend(pWal, iFrame, p->pgno);
45976 iFrame++;
45978 rc = walIndexAppend(pWal, iFrame, pLast->pgno);
45986 pWal->hdr.mxFrame = iFrame;
45994 pWal->iCallback = iFrame;