1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Do not read the database file size on a SAVEPOINT rollback any more since

after checkin [65b8636ac6e5] the in-header-size field is always valid.

FossilOrigin-Name: fbe70e1106bcc5086ceb9d8f39cc39baf3643092
This commit is contained in:
drh
2010-08-05 03:21:39 +00:00
parent aa0ba4345d
commit b9b49bf36b
3 changed files with 15 additions and 13 deletions

View File

@@ -3328,9 +3328,11 @@ int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
if( iSavepoint<0 && pBt->initiallyEmpty ) pBt->nPage = 0;
rc = newDatabase(pBt);
pBt->nPage = get4byte(28 + pBt->pPage1->aData);
if( pBt->nPage==0 ){
sqlite3PagerPagecount(pBt->pPager, (int*)&pBt->nPage);
}
/* The database size was written into the offset 28 of the header
** when the transaction started, so we know that the value at offset
** 28 is nonzero. */
assert( pBt->nPage>0 );
}
sqlite3BtreeLeave(p);
}