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 ){
41285 unsigned int nPage; /* Total number of pages in apHash */
41521 if( pCache->pFree || (pCache->nPage==0 && pcache1InitBulk(pCache)) ){
41714 pCache->nPage--;
41734 if( pCache->nPage==0 && pCache->pBulk ){
41751 TESTONLY( unsigned int nPage = 0; ) /* To assert pCache->nPage is correct */
41759 pCache->nPage--;
41765 TESTONLY( nPage++; )
41769 assert( pCache->nPage==nPage );
41814 && sqlite3GlobalConfig.nPage!=0
41817 pcache1.nInitPage = sqlite3GlobalConfig.nPage;
41932 n = pCache->nPage;
41956 assert( pCache->nPage >= pCache->nRecyclable );
41957 nPinned = pCache->nPage - pCache->nRecyclable;
41968 if( pCache->nPage>=pCache->nHash ) pcache1ResizeHash(pCache);
41974 && ((pCache->nPage+1>=pCache->nMax) || pcache1UnderMemoryPressure(pCache))
41999 pCache->nPage++;
42310 if( sqlite3GlobalConfig.nPage==0 ){
44874 static int pager_truncate(Pager *pPager, Pgno nPage);
45540 ** of the file is changed to nPage pages (nPage*pPager->pageSize bytes).
45541 ** If the file on disk is currently larger than nPage pages, then use the VFS
45545 ** nPage pages. Some operating system implementations can get confused if
45553 static int pager_truncate(Pager *pPager, Pgno nPage){
45566 newSize = szPage*(i64)nPage;
45578 pPager->dbFileSize = nPage;
46165 Pgno nPage; /* Value to return via *pnPage */
46175 nPage = sqlite3WalDbsize(pPager->pWal);
46182 if( nPage==0 ){
46191 nPage = (Pgno)((n+pPager->pageSize-1) / pPager->pageSize);
46198 if( nPage>pPager->mxPgno ){
46199 pPager->mxPgno = (Pgno)nPage;
46202 *pnPage = nPage;
46232 Pgno nPage; /* Size of the database file */
46234 rc = pagerPagecount(pPager, &nPage);
46236 if( nPage==0 ){
46852 ** Truncate the in-memory database file image to nPage pages. This
46862 SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager *pPager, Pgno nPage){
46863 assert( pPager->dbSize>=nPage );
46865 pPager->dbSize = nPage;
47763 /* pPager->nPage = 0; */
47898 Pgno nPage; /* Number of pages in database file */
47900 rc = pagerPagecount(pPager, &nPage);
47910 if( nPage==0 && !jrnlOpen ){
48139 Pgno nPage = 0;
48142 rc = pagerPagecount(pPager, &nPage);
48145 if( nPage>0 ){
48813 int nPage = 0; /* Number of pages starting at pg1 to journal */
48835 nPage = (pPg->pgno - pg1)+1;
48837 nPage = nPageCount+1-pg1;
48839 nPage = nPagePerSector;
48841 assert(nPage>0);
48843 assert((pg1+nPage)>pPg->pgno);
48845 for(ii=0; ii<nPage && rc==SQLITE_OK; ii++){
48867 /* If the PGHDR_NEED_SYNC flag is set for any of the nPage pages
48869 ** writing to any of these nPage pages may damage the others, the
48875 for(ii=0; ii<nPage; ii++){
50609 u32 nPage; /* Size of database in pages */
51476 pWal->hdr.nPage = nTruncate;
51511 if( pWal->hdr.nPage ){
52036 mxPage = pWal->hdr.nPage;
52105 i64 szDb = pWal->hdr.nPage*(i64)szPage;
52807 return pWal->hdr.nPage;
53259 pWal->hdr.nPage = nTruncate;
53941 u32 nPage; /* Number of pages in the database */
54181 Pgno nPage; /* Number of pages in the database */
55052 assert( pgno<=pBt->nPage );
55053 pBt->pHasContent = sqlite3BitvecCreate(pBt->nPage);
56443 return pBt->nPage;
56447 assert( ((p->pBt->nPage)&0x8000000)==0 );
57299 int nPage; /* Number of pages in the database */
57313 nPage = nPageHeader = get4byte(28+(u8*)pPage1->aData);
57315 if( nPage==0 || memcmp(24+(u8*)pPage1->aData, 92+(u8*)pPage1->aData,4)!=0 ){
57316 nPage = nPageFile;
57318 if( nPage>0 ){
57411 if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPage>nPageFile ){
57453 pBt->nPage = nPage;
57517 if( pBt->nPage>0 ){
57545 pBt->nPage = 1;
57558 p->pBt->nPage = 0;
57654 if( pBt->nPage==0 ) pBt->btsFlags |= BTS_INITIALLY_EMPTY;
57713 if( pBt->nPage!=get4byte(&pPage1->aData[28]) ){
57716 put4byte(&pPage1->aData[28], pBt->nPage);
58035 pBt->nPage = iLastPg;
58094 put4byte(&pBt->pPage1->aData[28], pBt->nPage);
58151 pBt->nPage = nFin;
58206 sqlite3PagerTruncateImage(pBt->pPager, pBt->nPage);
58427 int nPage = get4byte(28+(u8*)pPage1->aData);
58428 testcase( nPage==0 );
58429 if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);
58430 testcase( pBt->nPage!=nPage );
58431 pBt->nPage = nPage;
58503 pBt->nPage = 0;
58506 pBt->nPage = get4byte(28 + pBt->pPage1->aData);
58511 assert( pBt->nPage>0 );
60246 pBt->nPage++;
60247 if( pBt->nPage==PENDING_BYTE_PAGE(pBt) ) pBt->nPage++;
60250 if( pBt->autoVacuum && PTRMAP_ISPAGE(pBt, pBt->nPage) ){
60256 TRACE(("ALLOCATE: %d from end of file (pointer-map page)\n", pBt->nPage));
60257 assert( pBt->nPage!=PENDING_BYTE_PAGE(pBt) );
60258 rc = btreeGetUnusedPage(pBt, pBt->nPage, &pPg, bNoContent);
60264 pBt->nPage++;
60265 if( pBt->nPage==PENDING_BYTE_PAGE(pBt) ){ pBt->nPage++; }
60268 put4byte(28 + (u8*)pBt->pPage1->aData, pBt->nPage);
60269 *pPgno = pBt->nPage;
61308 static int ptrmapCheckPages(MemPage **apPage, int nPage){
61310 for(i=0; i<nPage; i++){
61913 sqlite3PagerRekey(apNew[iBest]->pDbPage, pBt->nPage+iBest+1, 0);
63302 assert( iPg<=pCheck->nPage && sizeof(pCheck->aPgRef[0])==1 );
63310 assert( iPg<=pCheck->nPage && sizeof(pCheck->aPgRef[0])==1 );
63325 if( iPage>pCheck->nPage ){
63635 int nPage; /* Number of pages on the overflow chain */
63638 nPage = (info.nPayload - info.nLocal + usableSize - 5)/(usableSize - 4);
63645 checkList(pCheck, 0, pgnoOvfl, nPage);
63791 sCheck.nPage = btreePagecount(sCheck.pBt);
63801 if( sCheck.nPage==0 ){
63805 sCheck.aPgRef = sqlite3MallocZero((sCheck.nPage / 8)+ 1);
63817 if( i<=sCheck.nPage ) setPageReferenced(&sCheck, i);
63844 for(i=1; i<=sCheck.nPage && sCheck.mxErr; i++){
64512 ** Copy nPage pages from the source b-tree to the destination.
64514 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
64577 for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){
131040 sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage);
131253 sqlite3GlobalConfig.nPage = va_arg(ap, int);
163300 int nPage;
163302 sqlite3PagerPagecount(pPager, &nPage);
163303 if( nPage==0 ){