Home | History | Annotate | Download | only in dist

Lines Matching refs:iPage

17374   int iPage,
17380 return id->pMethods->xShmMap(id, iPage, pgsz, bExtend, pp);
50829 ** Obtain a pointer to the iPage'th page of the wal-index. The wal-index
50837 static int walIndexPage(Wal *pWal, int iPage, volatile u32 **ppPage){
50841 if( pWal->nWiData<=iPage ){
50842 int nByte = sizeof(u32*)*(iPage+1);
50850 sizeof(u32*)*(iPage+1-pWal->nWiData));
50852 pWal->nWiData = iPage+1;
50856 if( pWal->apWiData[iPage]==0 ){
50858 pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ);
50859 if( !pWal->apWiData[iPage] ) rc = SQLITE_NOMEM;
50861 rc = sqlite3OsShmMap(pWal->pDbFd, iPage, WALINDEX_PGSZ,
50862 pWal->writeLock, (void volatile **)&pWal->apWiData[iPage]
50871 *ppPage = pWal->apWiData[iPage];
50872 assert( iPage==0 || *ppPage || rc!=SQLITE_OK );
50990 u32 iPage, /* Database page number for frame */
50998 sqlite3Put4byte(&aFrame[0], iPage);
51134 static int walHash(u32 iPage){
51135 assert( iPage>0 );
51137 return (iPage*HASHTABLE_HASH_1) & (HASHTABLE_NSLOT-1);
51291 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
51331 for(iKey=walHash(iPage); aHash[iKey]; iKey=walNextHash(iKey)){
51334 aPgno[idx] = iPage;
54047 i8 iPage; /* Index of current page in apPage */
55108 for(i=0; i<=pCur->iPage; i++){
55112 pCur->iPage
55243 testcase( p->iPage>0 );
56474 ** And if the fetch fails, this routine must decrement pCur->iPage.
56492 assert( pCur==0 || ppPage==&pCur->apPage[pCur->iPage] );
56494 assert( pCur==0 || pCur->iPage>0 );
56525 if( pCur ) pCur->iPage--;
58390 for(i=0; i<=p->iPage; i++){
58606 pCur->iPage = -1;
58665 memset(p, 0, offsetof(BtCursor, iPage));
58692 for(i=0; i<=pCur->iPage; i++){
58714 int iPage = pCur->iPage;
58716 btreeParseCell(pCur->apPage[iPage], pCur->aiIdx[iPage], &info);
58724 int iPage = pCur->iPage;
58726 btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info);
58778 assert( pCur->iPage>=0 );
58779 assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
58780 assert( pCur->apPage[pCur->iPage]->intKeyLeaf==1 );
58934 MemPage *pPage = pCur->apPage[pCur->iPage]; /* Btree page of current entry */
58943 assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
59131 assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
59132 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
59158 assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
59159 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
59189 assert( pCur!=0 && pCur->iPage>=0 && pCur->apPage[pCur->iPage]);
59193 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
59195 assert( pCur->info.pPayload>pCur->apPage[pCur->iPage]->aData || CORRUPT_DB );
59196 assert( pCur->info.pPayload<pCur->apPage[pCur->iPage]->aDataEnd ||CORRUPT_DB);
59197 amt = (int)(pCur->apPage[pCur->iPage]->aDataEnd - pCur->info.pPayload);
59240 assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
59241 assert( pCur->iPage>=0 );
59242 if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
59247 pCur->iPage++;
59248 pCur->aiIdx[pCur->iPage] = 0;
59249 return getAndInitPage(pBt, newPgno, &pCur->apPage[pCur->iPage],
59286 assert( pCur->iPage>0 );
59287 assert( pCur->apPage[pCur->iPage] );
59289 pCur->apPage[pCur->iPage-1],
59290 pCur->aiIdx[pCur->iPage-1],
59291 pCur->apPage[pCur->iPage]->pgno
59293 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
59296 releasePageNotNull(pCur->apPage[pCur->iPage--]);
59336 if( pCur->iPage>=0 ){
59337 while( pCur->iPage ){
59338 assert( pCur->apPage[pCur->iPage]!=0 );
59339 releasePageNotNull(pCur->apPage[pCur->iPage--]);
59345 assert( pCur->iPage==(-1) );
59352 pCur->iPage = 0;
59365 ** if pCur->iPage>=0). But this is not so if the database is corrupted
59405 while( rc==SQLITE_OK && !(pPage = pCur->apPage[pCur->iPage])->leaf ){
59406 assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
59407 pgno = get4byte(findCell(pPage, pCur->aiIdx[pCur->iPage]));
59430 while( !(pPage = pCur->apPage[pCur->iPage])->leaf ){
59432 pCur->aiIdx[pCur->iPage] = pPage->nCell;
59436 pCur->aiIdx[pCur->iPage] = pPage->nCell-1;
59454 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
59457 assert( pCur->apPage[pCur->iPage]->nCell>0 );
59481 for(ii=0; ii<pCur->iPage; ii++){
59484 assert( pCur->aiIdx[pCur->iPage]==pCur->apPage[pCur->iPage]->nCell-1 );
59485 assert( pCur->apPage[pCur->iPage]->leaf );
59493 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
59583 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage] );
59584 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->isInit );
59585 assert( pCur->eState==CURSOR_INVALID || pCur->apPage[pCur->iPage]->nCell>0 );
59588 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
59596 MemPage *pPage = pCur->apPage[pCur->iPage];
59611 pCur->aiIdx[pCur->iPage] = (u16)idx;
59632 pCur->aiIdx[pCur->iPage] = (u16)idx;
59699 pCur->aiIdx[pCur->iPage] = (u16)idx;
59720 pCur->aiIdx[pCur->iPage] = (u16)idx;
59732 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
59733 pCur->aiIdx[pCur->iPage] = (u16)idx;
59744 pCur->aiIdx[pCur->iPage] = (u16)lwr;
59820 pPage = pCur->apPage[pCur->iPage];
59821 idx = ++pCur->aiIdx[pCur->iPage];
59838 if( pCur->iPage==0 ){
59844 iPage];
59845 }while( pCur->aiIdx[pCur->iPage]>=pPage->nCell );
59868 pPage = pCur->apPage[pCur->iPage];
59869 if( (++pCur->aiIdx[pCur->iPage])>=pPage->nCell ){
59870 pCur->aiIdx[pCur->iPage]--;
59931 pPage = pCur->apPage[pCur->iPage];
59934 int idx = pCur->aiIdx[pCur->iPage];
59939 while( pCur->aiIdx[pCur->iPage]==0 ){
59940 if( pCur->iPage==0 ){
59950 pCur->aiIdx[pCur->iPage]--;
59951 pPage = pCur->apPage[pCur->iPage];
59969 || pCur->aiIdx[pCur->iPage]==0
59970 || pCur->apPage[pCur->iPage]->leaf==0
59974 pCur->aiIdx[pCur->iPage]--;
60177 Pgno iPage;
60184 iPage = get4byte(&aData[8+i*4]);
60185 if( iPage<=nearby ){
60205 iPage = get4byte(&aData[8+closest*4]);
60206 testcase( iPage==mxPage );
60207 if( iPage>mxPage ){
60211 testcase( iPage==mxPage );
60213 || (iPage==nearby || (iPage<nearby && eMode==BTALLOC_LE))
60216 *pPgno = iPage;
60311 ** This function is used to add page iPage to the database file free-list.
60316 ** corresponding to page iPage handy, it may pass it as the second value.
60322 static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
60331 assert( CORRUPT_DB || iPage>1 );
60332 assert( !pMemPage || pMemPage->pgno==iPage );
60334 if( iPage<2 ) return SQLITE_CORRUPT_BKPT;
60339 pPage = btreePageLookup(pBt, iPage);
60352 if( (!pPage && ((rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0) )
60364 ptrmapPut(pBt, iPage, PTRMAP_FREEPAGE, 0, &rc);
60413 put4byte(&pTrunk->aData[8+nLeaf*4], iPage);
60417 rc = btreeSetHasContent(pBt, iPage);
60430 if( pPage==0 && SQLITE_OK!=(rc = btreeGetPage(pBt, iPage, &pPage, 0)) ){
60439 put4byte(&pPage1->aData[32], iPage);
62299 int iPage = pCur->iPage;
62300 MemPage *pPage = pCur->apPage[iPage];
62302 if( iPage==0 ){
62312 pCur->iPage = 1;
62323 MemPage * const pParent = pCur->apPage[iPage-1];
62324 int const iIdx = pCur->aiIdx[iPage-1];
62371 rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1,
62392 pCur->iPage--;
62393 assert( pCur->iPage>=0 );
62500 pPage = pCur->apPage[pCur->iPage];
62514 idx = pCur->aiIdx[pCur->iPage];
62531 idx = ++pCur->aiIdx[pCur->iPage];
62567 pCur->apPage[pCur->iPage]->nOverflow = 0;
62570 assert( pCur->apPage[pCur->iPage]->nOverflow==0 );
62602 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
62605 iCellDepth = pCur->iPage;
62673 MemPage *pLeaf = pCur->apPage[pCur->iPage];
62706 if( rc==SQLITE_OK && pCur->iPage>iCellDepth ){
62707 while( pCur->iPage>iCellDepth ){
62708 releasePage(pCur->apPage[pCur->iPage--]);
62715 assert( bPreserve && pCur->iPage==iCellDepth );
62716 assert( pPage==pCur->apPage[pCur->iPage] );
63232 pPage = pCur->apPage[pCur->iPage];
63240 ** pCur->aiIdx[pCur->iPage] value is set to the index of the parent cell
63249 if( pCur->iPage==0 ){
63255 }while ( pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell );
63257 pCur->aiIdx[pCur->iPage]++;
63258 pPage = pCur->apPage[pCur->iPage];
63264 iIdx = pCur->aiIdx[pCur->iPage];
63334 ** Add 1 to the reference count for page iPage. If this is the second
63341 static int checkRef(IntegrityCk *pCheck, Pgno iPage){
63342 if( iPage==0 ) return 1;
63343 if( iPage>pCheck->nPage ){
63344 checkAppendMsg(pCheck, "invalid page number %d", iPage);
63347 if( getPageReferenced(pCheck, iPage) ){
63348 checkAppendMsg(pCheck, "2nd reference to page %d", iPage);
63351 setPageReferenced(pCheck, iPage);
63393 int iPage, /* Page number for first page in the list */
63398 int iFirst = iPage;
63402 if( iPage<1 ){
63408 if( checkRef(pCheck, iPage) ) break;
63409 if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage) ){
63410 checkAppendMsg(pCheck, "failed to get page %d", iPage);
63418 checkPtrmap(pCheck, iPage, PTRMAP_FREEPAGE, 0);
63423 "freelist leaf count too big on page %d", iPage);
63440 /* If this database supports auto-vacuum and iPage is not the last
63442 ** the following page matches iPage.
63446 checkPtrmap(pCheck, i, PTRMAP_OVERFLOW2, iPage);
63450 iPage = get4byte(pOvflData);
63453 if( isFreeList && N<(iPage!=0) ){
63528 int iPage, /* Page number of the page to check */
63562 if( iPage==0 ) return 0;
63563 if( checkRef(pCheck, iPage) ) return 0;
63565 pCheck->v1 = iPage;
63566 if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
63607 checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
63660 checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage);
63671 checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
63746 "Multiple uses for byte %u of page %d", x>>16, iPage);
63762 nFrag, data[hdr+7], iPage);
64096 assert( pCsr->apPage[pCsr->iPage]->intKey );
64854 ** This function is called after the contents of page iPage of the
64855 ** source database have been modified. If page iPage has already been
64857 ** destination is now invalidated. The destination copy of iPage needs
64867 Pgno iPage,
64873 if( !isFatalError(p->rc) && iPage<p->iNext ){
64874 /* The backup process p has already copied page iPage. But now it
64881 rc = backupOnePage(p, iPage, aData, 1);
64890 SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
64891 if( pBackup ) backupUpdate(pBackup, iPage, aData);
162992 int iPage; /* Current entry in aPage[] */
163154 pCsr->iPage = 0;
163341 pCsr->iPage = 0;
163350 StatPage *p = &pCsr->aPage[pCsr->iPage];
163385 if( pCsr->iPage==0 ) return statNext(pCursor);
163386 pCsr->iPage--;
163389 pCsr->iPage++;
163390 assert( p==&pCsr->aPage[pCsr->iPage-1] );
163410 StatPage *p = &pCsr->aPage[pCsr->iPage];