1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

The previous check-in with changes to the max_page_count pragma was not

quite correct.  This check-in fixes the problem.

FossilOrigin-Name: 30c26c3b13b29ce57683e91ac11641d4eb4d678f
This commit is contained in:
drh
2010-11-23 20:25:08 +00:00
parent 60ac3f426c
commit c84e033c92
4 changed files with 23 additions and 18 deletions

View File

@@ -3483,9 +3483,8 @@ int sqlite3PagerMaxPageCount(Pager *pPager, int mxPage){
if( mxPage>0 ){
pPager->mxPgno = mxPage;
}
if( pPager->eState!=PAGER_OPEN && pPager->mxPgno<pPager->dbSize ){
pPager->mxPgno = pPager->dbSize;
}
assert( pPager->eState!=PAGER_OPEN ); /* Called only by OP_MaxPgcnt */
assert( pPager->mxPgno>=pPager->dbSize ); /* OP_MaxPgcnt enforces this */
return pPager->mxPgno;
}