Lines Matching refs:Pgno
8588 typedef u32 Pgno; typedef
8608 #define PAGER_MJ_PGNO(x) ((Pgno)((PENDING_BYTE/((x)->pageSize))+1))
8670 SQLITE_PRIVATE int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);
8672 SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);
8679 SQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int);
8715 SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno);
8723 SQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage*);
8770 Pgno pgno; /* Page number for this page */
8829 SQLITE_PRIVATE int sqlite3PcacheFetch(PCache*, Pgno, int createFlag, PgHdr**);
8838 SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr*, Pgno);
8841 SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache*, Pgno x);
11631 SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *, Pgno, const u8 *);
34889 Pgno pgno, /* Page number to obtain */
35079 SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr *p, Pgno newPgno){
35100 SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){
36760 SQLITE_PRIVATE int sqlite3WalRead(Wal *pWal, Pgno pgno, int *pInWal, int nOut, u8 *pOut);
36763 SQLITE_PRIVATE Pgno sqlite3WalDbsize(Wal *pWal);
36770 SQLITE_PRIVATE int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx);
36781 SQLITE_PRIVATE int sqlite3WalFrames(Wal *pWal, int, PgHdr *, Pgno, int, int);
37244 Pgno nOrig; /* Original number of pages in file */
37245 Pgno iSubRec; /* Index of first record in sub-journal */
37435 Pgno dbSize; /* Number of pages in the database */
37436 Pgno dbOrigSize; /* dbSize before the current transaction */
37437 Pgno dbFileSize; /* Number of pages in the database file */
37438 Pgno dbHintSize; /* Value passed to FCNTL_SIZE_HINT call */
37462 Pgno mxPgno; /* Maximum allowed size of the database */
37474 void *(*xCodec)(void*,void*,Pgno,int); /* Routine for en/decoding data */
37788 Pgno pgno = pPg->pgno;
38446 static PgHdr *pager_lookup(Pager *pPager, Pgno pgno){
38488 static int addToSavepointBitvecs(Pager *pPager, Pgno pgno){
38900 Pgno pgno; /* The page number of a page in journal */
38945 if( pgno>(Pgno)pPager->dbSize || sqlite3BitvecTest(pDone, pgno) ){
39266 static int pager_truncate(Pager *pPager, Pgno nPage){
39394 Pgno mxPg = 0; /* Size of the original file in pages */
39592 Pgno pgno = pPg->pgno; /* Page number to read */
39684 static int pagerUndoCallback(void *pCtx, Pgno iPg){
39753 Pgno nTruncate, /* Database size after this commit */
39844 static int pagerPagecount(Pager *pPager, Pgno *pnPage){
39845 Pgno nPage; /* Value to return via *pnPage */
39872 nPage = (Pgno)(n / pPager->pageSize);
39883 pPager->mxPgno = (Pgno)nPage;
39916 Pgno nPage; /* Size of the database file */
40295 pPager->dbSize = (Pgno)(nByte/pageSize);
40487 SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager *pPager, Pgno nPage){
40589 SQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage *pPg){
40807 Pgno pgno = pList->pgno;
41411 Pgno nPage; /* Number of pages in database file */
41650 Pgno nPage = 0;
41766 Pgno pgno, /* Page number to fetch */
41877 SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){
42231 Pgno nPagePerSector = (pPager->sectorSize/pPager->pageSize);
42238 Pgno nPageCount; /* Total number of pages in database file */
42239 Pgno pg1; /* First page of the sector pPg is located on. */
42271 Pgno pg = pg1+ii;
42630 Pgno i; /* Iterator variable */
42631 const Pgno iSkip = PAGER_MJ_PGNO(pPager); /* Pending lock page */
42632 const Pgno dbSize = pPager->dbSize; /* Database image size */
42680 Pgno nNew = pPager->dbSize - (pPager->dbSize==PAGER_MJ_PGNO(pPager));
43066 void *(*xCodec)(void*,void*,Pgno,int),
43109 SQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, int isCommit){
43111 Pgno needSyncPgno = 0; /* Old value of pPg->pgno, if sync is required */
43113 Pgno origPgno; /* The original page number */
45018 Pgno dbpage;
45874 Pgno pgno, /* Database page number to read data for */
45988 SQLITE_PRIVATE Pgno sqlite3WalDbsize(Wal *pWal){
46066 SQLITE_PRIVATE int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx){
46069 Pgno iMax = pWal->hdr.mxFrame;
46070 Pgno iFrame;
46236 Pgno nTruncate, /* Database size after this commit */
46891 Pgno pgno; /* Page number for this page */
46910 Pgno iTable; /* Root page of table */
47087 Pgno pgnoRoot; /* The root page of this tree */
47098 Pgno *aOverflow; /* Cache of overflow page locations */
47227 Pgno nPage; /* Number of pages in the database */
47638 Pgno iRoot, /* Root page of b-tree */
47643 Pgno iTab = 0;
47717 static int hasReadConflicts(Btree *pBtree, Pgno iRoot){
47737 static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){
47809 static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
48040 static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
48062 static int btreeGetHasContent(BtShared *pBt, Pgno pgno){
48133 static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
48253 static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
48255 Pgno iPtrMap, ret;
48277 static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
48280 Pgno iPtrmap; /* The pointer map page number */
48329 static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
48565 Pgno ovfl = get4byte(&pCell[info.iOverflow]);
49039 static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
49062 Pgno pgno, /* Number of the page to fetch */
49081 static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
49095 static Pgno btreePagecount(BtShared *pBt){
49114 Pgno pgno, /* Number of the page to get */
49337 assert( sizeof(Pgno)==4 );
50195 Pgno pgno = pPage->pgno;
50210 Pgno childPgno = get4byte(pCell);
50216 Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
50239 static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
50302 Pgno iPtrPage, /* Pointer map 'page-no' entry for pDbPage */
50303 Pgno iFreePage, /* The location to move pDbPage to */
50307 Pgno iDbPage = pDbPage->pgno;
50339 Pgno nextOvfl = get4byte(pDbPage->aData);
50372 static int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);
50392 static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg){
50393 Pgno nFreeList; /* Number of pages still on the free-list */
50401 Pgno iPtrPage;
50423 Pgno iFreePg;
50433 Pgno iFreePg; /* Index of free page to move pLastPg to */
50539 Pgno nFin; /* Number of pages in database after autovacuuming */
50540 Pgno nFree; /* Number of pages on the freelist initially */
50541 Pgno nPtrmap; /* Number of PtrMap pages to be freed */
50542 Pgno iFree; /* The next page to be freed */
50544 Pgno nOrig; /* Database size before freeing */
50991 pCur->pgnoRoot = (Pgno)iTable;
51229 Pgno ovfl, /* Current overflow page number */
51231 Pgno *pPgnoNext /* OUT: Next overflow page number */
51233 Pgno next = 0;
51248 Pgno pgno;
51249 Pgno iGuess = ovfl+1;
51390 Pgno nextPage;
51404 pCur->aOverflow = (Pgno *)sqlite3MallocZero(sizeof(Pgno)*nOvfl);
51659 static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
51774 Pgno subpage;
51793 Pgno pgno;
51818 Pgno pgno;
51972 Pgno chldPg;
52273 Pgno *pPgno,
52274 Pgno nearby,
52283 Pgno mxPage; /* Total size of the database file */
52295 Pgno iTrunk;
52392 Pgno iNewTrunk = get4byte(&pTrunk->aData[8]);
52428 Pgno iPage;
52549 static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
52551 Pgno iTrunk = 0; /* Page number of free-list trunk page */
52683 Pgno ovflPgno;
52699 Pgno iNext = 0;
52768 Pgno pgnoOvfl = 0;
52817 Pgno pgnoPtrmap = pgnoOvfl; /* Overflow page pointer-map entry page */
52972 Pgno iChild, /* If non-zero, replace first 4 bytes with this value */
53139 Pgno pgnoNew; /* Page number of pNew */
53225 Pgno n;
53238 Pgno ovfl = get4byte(&z[info.iOverflow]);
53243 Pgno child = get4byte(z);
53249 Pgno child = get4byte(&pPage->aData[pPage->hdrOffset+8]);
53388 Pgno pgno; /* Temp var to store a page number in */
53996 Pgno pgnoChild = 0; /* Page number of the new child page */
54391 Pgno n = pCur->apPage[iCellDepth+1]->pgno;
54450 Pgno pgnoRoot;
54465 Pgno pgnoMove; /* Move a page here to make room for the root-page */
54508 Pgno iPtrPage = 0;
54596 Pgno pgno, /* Page number to clear */
54663 rc = saveAllCursors(pBt, (Pgno)iTable, 0);
54665 rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
54691 static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
54712 rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
54728 Pgno maxRootPgno;
54980 static int checkRef(IntegrityCk *pCheck, Pgno iPage, char *zContext){
55001 Pgno iChild, /* Child page number */
55003 Pgno iParent, /* Expected pointer map parent page number */
55008 Pgno iPtrmapParent;
55049 if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage) ){
55067 Pgno iFreePage = get4byte(&pOvflData[8+i*4]);
55142 if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
55190 Pgno pgnoOvfl = get4byte(&pCell[info.iOverflow]);
55346 Pgno i;
55719 Pgno iNext; /* Page number of the next source page to copy */
55728 Pgno nRemaining; /* Number of pages left to copy */
55729 Pgno nPagecount; /* Total number of pages to copy */
55902 static int backupOnePage(sqlite3_backup *p, Pgno iSrcPg, const u8 *zSrcData){
55954 Pgno iDest = (Pgno)(iOff/nDestPgsz)+1;
56072 for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){
56073 const Pgno iSrcPg = p->iNext; /* Source page number */
56087 if( p->iNext>(Pgno)nSrcPage ){
56170 const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1);
56302 SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){