Lines Matching refs:nPage
7434 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
13504 int nPage; /* Number of pages in pPage[] */
14713 SQLITE_DEFAULT_PCACHE_INITSZ, /* nPage */
21503 || sqlite3GlobalConfig.nPage<=0 ){
41303 unsigned int nPage; /* Total number of pages in apHash */
41539 if( pCache->pFree || (pCache->nPage==0 && pcache1InitBulk(pCache)) ){
41732 pCache->nPage--;
41752 if( pCache->nPage==0 && pCache->pBulk ){
41769 TESTONLY( unsigned int nPage = 0; ) /* To assert pCache->nPage is correct */
41777 pCache->nPage--;
41783 TESTONLY( nPage++; )
41787 assert( pCache->nPage==nPage );
41832 && sqlite3GlobalConfig.nPage!=0
41835 pcache1.nInitPage = sqlite3GlobalConfig.nPage;
41950 n = pCache->nPage;
41974 assert( pCache->nPage >= pCache->nRecyclable );
41975 nPinned = pCache->nPage - pCache->nRecyclable;
41986 if( pCache->nPage>=pCache->nHash ) pcache1ResizeHash(pCache);
41992 && ((pCache->nPage+1>=pCache->nMax) || pcache1UnderMemoryPressure(pCache))
42017 pCache->nPage++;
42328 if( sqlite3GlobalConfig.nPage==0 ){
44892 static int pager_truncate(Pager *pPager, Pgno nPage);
45558 ** of the file is changed to nPage pages (nPage*pPager->pageSize bytes).
45559 ** If the file on disk is currently larger than nPage pages, then use the VFS
45563 ** nPage pages. Some operating system implementations can get confused if
45571 static int pager_truncate(Pager *pPager, Pgno nPage){
45584 newSize = szPage*(i64)nPage;
45596 pPager->dbFileSize = nPage;
46183 Pgno nPage; /* Value to return via *pnPage */
46193 nPage = sqlite3WalDbsize(pPager->pWal);
46200 if( nPage==0 ){
46209 nPage = (Pgno)((n+pPager->pageSize-1) / pPager->pageSize);
46216 if( nPage>pPager->mxPgno ){
46217 pPager->mxPgno = (Pgno)nPage;
46220 *pnPage = nPage;
46250 Pgno nPage; /* Size of the database file */
46252 rc = pagerPagecount(pPager, &nPage);
46254 if( nPage==0 ){
46870 ** Truncate the in-memory database file image to nPage pages. This
46880 SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager *pPager, Pgno nPage){
46881 assert( pPager->dbSize>=nPage );
46883 pPager->dbSize = nPage;
47781 /* pPager->nPage = 0; */
47916 Pgno nPage; /* Number of pages in database file */
47918 rc = pagerPagecount(pPager, &nPage);
47928 if( nPage==0 && !jrnlOpen ){
48157 Pgno nPage = 0;
48160 rc = pagerPagecount(pPager, &nPage);
48163 if( nPage>0 ){
48831 int nPage = 0; /* Number of pages starting at pg1 to journal */
48853 nPage = (pPg->pgno - pg1)+1;
48855 nPage = nPageCount+1-pg1;
48857 nPage = nPagePerSector;
48859 assert(nPage>0);
48861 assert((pg1+nPage)>pPg->pgno);
48863 for(ii=0; ii<nPage && rc==SQLITE_OK; ii++){
48885 /* If the PGHDR_NEED_SYNC flag is set for any of the nPage pages
48887 ** writing to any of these nPage pages may damage the others, the
48893 for(ii=0; ii<nPage; ii++){
50627 u32 nPage; /* Size of database in pages */
51494 pWal->hdr.nPage = nTruncate;
51529 if( pWal->hdr.nPage ){
52054 mxPage = pWal->hdr.nPage;
52123 i64 szDb = pWal->hdr.nPage*(i64)szPage;
52825 return pWal->hdr.nPage;
53277 pWal->hdr.nPage = nTruncate;
53959 u32 nPage; /* Number of pages in the database */
54199 Pgno nPage; /* Number of pages in the database */
55070 assert( pgno<=pBt->nPage );
55071 pBt->pHasContent = sqlite3BitvecCreate(pBt->nPage);
56461 return pBt->nPage;
56465 assert( ((p->pBt->nPage)&0x8000000)==0 );
57317 int nPage; /* Number of pages in the database */
57331 nPage = nPageHeader = get4byte(28+(u8*)pPage1->aData);
57333 if( nPage==0 || memcmp(24+(u8*)pPage1->aData, 92+(u8*)pPage1->aData,4)!=0 ){
57334 nPage = nPageFile;
57336 if( nPage>0 ){
57429 if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPage>nPageFile ){
57471 pBt->nPage = nPage;
57535 if( pBt->nPage>0 ){
57563 pBt->nPage = 1;
57576 p->pBt->nPage = 0;
57672 if( pBt->nPage==0 ) pBt->btsFlags |= BTS_INITIALLY_EMPTY;
57731 if( pBt->nPage!=get4byte(&pPage1->aData[28]) ){
57734 put4byte(&pPage1->aData[28], pBt->nPage);
58053 pBt->nPage = iLastPg;
58112 put4byte(&pBt->pPage1->aData[28], pBt->nPage);
58169 pBt->nPage = nFin;
58224 sqlite3PagerTruncateImage(pBt->pPager, pBt->nPage);
58445 int nPage = get4byte(28+(u8*)pPage1->aData);
58446 testcase( nPage==0 );
58447 if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);
58448 testcase( pBt->nPage!=nPage );
58449 pBt->nPage = nPage;
58521 pBt->nPage = 0;
58524 pBt->nPage = get4byte(28 + pBt->pPage1->aData);
58529 assert( pBt->nPage>0 );
60264 pBt->nPage++;
60265 if( pBt->nPage==PENDING_BYTE_PAGE(pBt) ) pBt->nPage++;
60268 if( pBt->autoVacuum && PTRMAP_ISPAGE(pBt, pBt->nPage) ){
60274 TRACE(("ALLOCATE: %d from end of file (pointer-map page)\n", pBt->nPage));
60275 assert( pBt->nPage!=PENDING_BYTE_PAGE(pBt) );
60276 rc = btreeGetUnusedPage(pBt, pBt->nPage, &pPg, bNoContent);
60282 pBt->nPage++;
60283 if( pBt->nPage==PENDING_BYTE_PAGE(pBt) ){ pBt->nPage++; }
60286 put4byte(28 + (u8*)pBt->pPage1->aData, pBt->nPage);
60287 *pPgno = pBt->nPage;
61326 static int ptrmapCheckPages(MemPage **apPage, int nPage){
61328 for(i=0; i<nPage; i++){
61931 sqlite3PagerRekey(apNew[iBest]->pDbPage, pBt->nPage+iBest+1, 0);
63320 assert( iPg<=pCheck->nPage && sizeof(pCheck->aPgRef[0])==1 );
63328 assert( iPg<=pCheck->nPage && sizeof(pCheck->aPgRef[0])==1 );
63343 if( iPage>pCheck->nPage ){
63653 int nPage; /* Number of pages on the overflow chain */
63656 nPage = (info.nPayload - info.nLocal + usableSize - 5)/(usableSize - 4);
63663 checkList(pCheck, 0, pgnoOvfl, nPage);
63809 sCheck.nPage = btreePagecount(sCheck.pBt);
63819 if( sCheck.nPage==0 ){
63823 sCheck.aPgRef = sqlite3MallocZero((sCheck.nPage / 8)+ 1);
63835 if( i<=sCheck.nPage ) setPageReferenced(&sCheck, i);
63862 for(i=1; i<=sCheck.nPage && sCheck.mxErr; i++){
64530 ** Copy nPage pages from the source b-tree to the destination.
64532 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
64595 for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){
131058 sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage);
131271 sqlite3GlobalConfig.nPage = va_arg(ap, int);
163330 int nPage;
163332 sqlite3PagerPagecount(pPager, &nPage);
163333 if( nPage==0 ){