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

Continuing refinements to the filesize-in-header enhancement.

FossilOrigin-Name: 79e22b95038c50b9b7f35e09262805ff6338b59b
This commit is contained in:
drh
2010-03-30 22:58:33 +00:00
parent bf59283ba2
commit b1299158c7
8 changed files with 52 additions and 62 deletions

View File

@@ -331,9 +331,8 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
/* Now that there is a read-lock on the source database, query the
** source pager for the number of pages in the database.
*/
if( rc==SQLITE_OK ){
rc = sqlite3PagerPagecount(pSrcPager, &nSrcPage);
}
nSrcPage = (int)sqlite3BtreeLastPage(p->pSrc);
assert( nSrcPage>=0 );
for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){
const Pgno iSrcPg = p->iNext; /* Source page number */
if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){