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

Make sure nOverflow is always cleared when a page is released. (CVS 6059)

FossilOrigin-Name: 8d0f724477422db05ed46e58ce40a720107384f0
This commit is contained in:
drh
2008-12-23 15:58:06 +00:00
parent dd5f5a6231
commit 30df00983e
3 changed files with 12 additions and 8 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.551 2008/12/23 10:37:47 danielk1977 Exp $
** $Id: btree.c,v 1.552 2008/12/23 15:58:06 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -1181,6 +1181,7 @@ static int getAndInitPage(
*/
static void releasePage(MemPage *pPage){
if( pPage ){
assert( pPage->nOverflow==0 || sqlite3PagerPageRefcount(pPage->pDbPage)>1 );
assert( pPage->aData );
assert( pPage->pBt );
assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
@@ -5752,6 +5753,9 @@ static int balance_deeper(BtCursor *pCur){
if( rc==SQLITE_OK ){
rc = setChildPtrmaps(pChild);
}
if( rc ){
pChild->nOverflow = 0;
}
#endif
}
}