Index: src/btree.c ================================================================== --- src/btree.c +++ src/btree.c @@ -7,11 +7,11 @@ ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.387 2007/05/24 07:47:07 danielk1977 Exp $ +** $Id: btree.c,v 1.388 2007/05/24 09:20:16 danielk1977 Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. ** Including a description of file format and an overview of operation. */ @@ -4242,15 +4242,15 @@ ** with entries for the new page, and any pointer from the ** cell on the page to an overflow page. */ if( pBt->autoVacuum ){ rc = ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno); - if( rc!=SQLITE_OK ){ - return rc; + if( rc==SQLITE_OK ){ + rc = ptrmapPutOvfl(pNew, 0); } - rc = ptrmapPutOvfl(pNew, 0); if( rc!=SQLITE_OK ){ + releasePage(pNew); return rc; } } #endif