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

Restore the size information in the BtShared structure when a transaction

rolls back.

FossilOrigin-Name: 802aeb30c9baf4059fa84f4693f290f80d3a4085
This commit is contained in:
drh
2010-04-01 02:22:19 +00:00
parent a792dc5c4a
commit 1f5b467f13
3 changed files with 15 additions and 10 deletions

View File

@@ -3198,6 +3198,11 @@ int sqlite3BtreeRollback(Btree *p){
** call btreeGetPage() on page 1 again to make
** sure pPage1->aData is set correctly. */
if( btreeGetPage(pBt, 1, &pPage1, 0)==SQLITE_OK ){
int nPage = get4byte(28+(u8*)pPage1->aData);
testcase( nPage==0 );
if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);
testcase( pBt->nPage!=nPage );
pBt->nPage = nPage;
releasePage(pPage1);
}
assert( countWriteCursors(pBt)==0 );