• Home
  • Raw
  • Download

Lines Matching refs:iPage

20309   int iPage,  in sqlite3OsShmMap()  argument
20315 return id->pMethods->xShmMap(id, iPage, pgsz, bExtend, pp); in sqlite3OsShmMap()
55190 static int walIndexPage(Wal *pWal, int iPage, volatile u32 **ppPage){
55194 if( pWal->nWiData<=iPage ){
55195 int nByte = sizeof(u32*)*(iPage+1);
55203 sizeof(u32*)*(iPage+1-pWal->nWiData));
55205 pWal->nWiData = iPage+1;
55209 if( pWal->apWiData[iPage]==0 ){
55211 pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ);
55212 if( !pWal->apWiData[iPage] ) rc = SQLITE_NOMEM_BKPT;
55214 rc = sqlite3OsShmMap(pWal->pDbFd, iPage, WALINDEX_PGSZ,
55215 pWal->writeLock, (void volatile **)&pWal->apWiData[iPage]
55224 *ppPage = pWal->apWiData[iPage];
55225 assert( iPage==0 || *ppPage || rc!=SQLITE_OK );
55343 u32 iPage, /* Database page number for frame */
55351 sqlite3Put4byte(&aFrame[0], iPage);
55490 static int walHash(u32 iPage){
55491 assert( iPage>0 );
55493 return (iPage*HASHTABLE_HASH_1) & (HASHTABLE_NSLOT-1);
55647 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
55687 for(iKey=walHash(iPage); aHash[iKey]; iKey=walNextHash(iKey)){
55690 aPgno[idx] = iPage;
58730 i8 iPage; /* Index of current page in apPage */
59810 for(i=0; i<=pCur->iPage; i++){
59814 pCur->iPage = -1;
59943 testcase( p->iPage>0 );
61257 assert( pCur==0 || ppPage==&pCur->apPage[pCur->iPage] );
61259 assert( pCur==0 || pCur->iPage>0 );
61291 if( pCur ) pCur->iPage--;
63186 for(i=0; i<=p->iPage; i++){
63420 pCur->iPage = -1;
63478 memset(p, 0, offsetof(BtCursor, iPage));
63505 for(i=0; i<=pCur->iPage; i++){
63527 int iPage = pCur->iPage;
63529 btreeParseCell(pCur->apPage[iPage], pCur->ix, &info);
63537 int iPage = pCur->iPage;
63539 btreeParseCell(pCur->apPage[iPage],pCur->ix,&pCur->info);
63737 MemPage *pPage = pCur->apPage[pCur->iPage]; /* Btree page of current entry */
63932 assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
63933 assert( pCur->ix<pCur->apPage[pCur->iPage]->nCell );
63991 assert( pCur!=0 && pCur->iPage>=0 && pCur->apPage[pCur->iPage]);
63995 assert( pCur->ix<pCur->apPage[pCur->iPage]->nCell );
63997 assert( pCur->info.pPayload>pCur->apPage[pCur->iPage]->aData || CORRUPT_DB );
63998 assert( pCur->info.pPayload<pCur->apPage[pCur->iPage]->aDataEnd ||CORRUPT_DB);
63999 amt = (int)(pCur->apPage[pCur->iPage]->aDataEnd - pCur->info.pPayload);
64039 assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
64040 assert( pCur->iPage>=0 );
64041 if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
64046 pCur->aiIdx[pCur->iPage++] = pCur->ix;
64048 return getAndInitPage(pBt, newPgno, &pCur->apPage[pCur->iPage],
64085 assert( pCur->iPage>0 );
64086 assert( pCur->apPage[pCur->iPage] );
64088 pCur->apPage[pCur->iPage-1],
64089 pCur->aiIdx[pCur->iPage-1],
64090 pCur->apPage[pCur->iPage]->pgno
64092 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
64095 pCur->ix = pCur->aiIdx[pCur->iPage-1];
64096 releasePageNotNull(pCur->apPage[pCur->iPage--]);
64136 if( pCur->iPage>=0 ){
64137 if( pCur->iPage ){
64139 assert( pCur->apPage[pCur->iPage]!=0 );
64140 releasePageNotNull(pCur->apPage[pCur->iPage--]);
64141 }while( pCur->iPage);
64148 assert( pCur->iPage==(-1) );
64155 pCur->iPage = 0;
64210 while( rc==SQLITE_OK && !(pPage = pCur->apPage[pCur->iPage])->leaf ){
64235 while( !(pPage = pCur->apPage[pCur->iPage])->leaf ){
64259 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
64262 assert( pCur->apPage[pCur->iPage]->nCell>0 );
64286 for(ii=0; ii<pCur->iPage; ii++){
64289 assert( pCur->ix==pCur->apPage[pCur->iPage]->nCell-1 );
64290 assert( pCur->apPage[pCur->iPage]->leaf );
64298 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
64408 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage] );
64409 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->isInit );
64410 assert( pCur->eState==CURSOR_INVALID || pCur->apPage[pCur->iPage]->nCell>0 );
64413 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
64421 MemPage *pPage = pCur->apPage[pCur->iPage];
64558 assert( pCur->ix<pCur->apPage[pCur->iPage]->nCell );
64612 if( NEVER(pCur->apPage[pCur->iPage]->leaf==0) ) return -1;
64614 for(n=1, i=0; i<=pCur->iPage; i++){
64670 pPage = pCur->apPage[pCur->iPage];
64688 if( pCur->iPage==0 ){
64694 pPage = pCur->apPage[pCur->iPage];
64718 pPage = pCur->apPage[pCur->iPage];
64781 pPage = pCur->apPage[pCur->iPage];
64790 if( pCur->iPage==0 ){
64801 pPage = pCur->apPage[pCur->iPage];
64820 || pCur->apPage[pCur->iPage]->leaf==0
65027 Pgno iPage;
65034 iPage = get4byte(&aData[8+i*4]);
65035 if( iPage<=nearby ){
65055 iPage = get4byte(&aData[8+closest*4]);
65056 testcase( iPage==mxPage );
65057 if( iPage>mxPage ){
65061 testcase( iPage==mxPage );
65063 || (iPage==nearby || (iPage<nearby && eMode==BTALLOC_LE))
65066 *pPgno = iPage;
65172 static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
65181 assert( CORRUPT_DB || iPage>1 );
65182 assert( !pMemPage || pMemPage->pgno==iPage );
65184 if( iPage<2 ) return SQLITE_CORRUPT_BKPT;
65189 pPage = btreePageLookup(pBt, iPage);
65202 if( (!pPage && ((rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0) )
65214 ptrmapPut(pBt, iPage, PTRMAP_FREEPAGE, 0, &rc);
65263 put4byte(&pTrunk->aData[8+nLeaf*4], iPage);
65267 rc = btreeSetHasContent(pBt, iPage);
65280 if( pPage==0 && SQLITE_OK!=(rc = btreeGetPage(pBt, iPage, &pPage, 0)) ){
65289 put4byte(&pPage1->aData[32], iPage);
67131 int iPage = pCur->iPage;
67132 MemPage *pPage = pCur->apPage[iPage];
67134 if( iPage==0 ){
67145 pCur->iPage = 1;
67156 MemPage * const pParent = pCur->apPage[iPage-1];
67157 int const iIdx = pCur->aiIdx[iPage-1];
67205 rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1,
67226 pCur->iPage--;
67227 assert( pCur->iPage>=0 );
67359 pPage = pCur->apPage[pCur->iPage];
67446 pCur->apPage[pCur->iPage]->nOverflow = 0;
67463 assert( pCur->apPage[pCur->iPage]->nOverflow==0 );
67504 assert( pCur->ix<pCur->apPage[pCur->iPage]->nCell );
67508 iCellDepth = pCur->iPage;
67576 MemPage *pLeaf = pCur->apPage[pCur->iPage];
67611 if( rc==SQLITE_OK && pCur->iPage>iCellDepth ){
67612 while( pCur->iPage>iCellDepth ){
67613 releasePage(pCur->apPage[pCur->iPage--]);
67620 assert( bPreserve && (pCur->iPage==iCellDepth || CORRUPT_DB) );
67621 assert( pPage==pCur->apPage[pCur->iPage] || CORRUPT_DB );
68116 pPage = pCur->apPage[pCur->iPage];
68133 if( pCur->iPage==0 ){
68139 }while ( pCur->ix>=pCur->apPage[pCur->iPage]->nCell );
68142 pPage = pCur->apPage[pCur->iPage];
68225 static int checkRef(IntegrityCk *pCheck, Pgno iPage){
68226 if( iPage==0 ) return 1;
68227 if( iPage>pCheck->nPage ){
68228 checkAppendMsg(pCheck, "invalid page number %d", iPage);
68231 if( getPageReferenced(pCheck, iPage) ){
68232 checkAppendMsg(pCheck, "2nd reference to page %d", iPage);
68235 setPageReferenced(pCheck, iPage);
68277 int iPage, /* Page number for first page in the list */
68282 int iFirst = iPage;
68286 if( iPage<1 ){
68292 if( checkRef(pCheck, iPage) ) break;
68293 if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage, 0) ){
68294 checkAppendMsg(pCheck, "failed to get page %d", iPage);
68302 checkPtrmap(pCheck, iPage, PTRMAP_FREEPAGE, 0);
68307 "freelist leaf count too big on page %d", iPage);
68330 checkPtrmap(pCheck, i, PTRMAP_OVERFLOW2, iPage);
68334 iPage = get4byte(pOvflData);
68337 if( isFreeList && N<(iPage!=0) ){
68412 int iPage, /* Page number of the page to check */
68446 if( iPage==0 ) return 0;
68447 if( checkRef(pCheck, iPage) ) return 0;
68449 pCheck->v1 = iPage;
68450 if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
68491 checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
68545 checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage);
68556 checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
68631 "Multiple uses for byte %u of page %d", x>>16, iPage);
68647 nFrag, data[hdr+7], iPage);
68983 assert( pCsr->apPage[pCsr->iPage]->intKey );
69765 Pgno iPage,
69771 if( !isFatalError(p->rc) && iPage<p->iNext ){
69779 rc = backupOnePage(p, iPage, aData, 1);
69788 SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
69789 if( pBackup ) backupUpdate(pBackup, iPage, aData);
174343 int iPage; /* Current entry in aPage[] */
174507 pCsr->iPage = 0;
174694 pCsr->iPage = 0;
174703 StatPage *p = &pCsr->aPage[pCsr->iPage];
174738 if( pCsr->iPage==0 ) return statNext(pCursor);
174739 pCsr->iPage--;
174742 pCsr->iPage++;
174743 assert( p==&pCsr->aPage[pCsr->iPage-1] );
174763 StatPage *p = &pCsr->aPage[pCsr->iPage];