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

When rolling back a savepoint to the beginning of the transaction, make sure

to initialize the database size in the btree layer correctly even if the
database size field of the header is zeroed.

FossilOrigin-Name: a3540c6acf2bb6bdd44c101b63f17ca85e6b68ed
This commit is contained in:
drh
2010-04-07 20:29:56 +00:00
parent 0a7a9155a4
commit d14133e3f4
3 changed files with 21 additions and 8 deletions

View File

@@ -3280,6 +3280,9 @@ 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);
}
}
sqlite3BtreeLeave(p);
}