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

Fix the problems demonstrated in tkt35xx.test in a different way to (5936). (CVS 5938)

FossilOrigin-Name: ddf980a50127a9de35edeca5549f4b51e3f733e6
This commit is contained in:
danielk1977
2008-11-21 09:09:01 +00:00
parent 3e168ebec2
commit b247c21c15
5 changed files with 24 additions and 38 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.539 2008/11/19 10:22:33 danielk1977 Exp $
** $Id: btree.c,v 1.540 2008/11/21 09:09:02 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -4304,9 +4304,12 @@ static int allocateBtreePage(
end_allocate_page:
releasePage(pTrunk);
releasePage(pPrevTrunk);
if( rc==SQLITE_OK && sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
releasePage(*ppPage);
return SQLITE_CORRUPT_BKPT;
if( rc==SQLITE_OK ){
if( sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
releasePage(*ppPage);
return SQLITE_CORRUPT_BKPT;
}
(*ppPage)->isInit = 0;
}
return rc;
}