Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a page reference leak that could occur after an IO error. (CVS 4036) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d00c8242c610476c15d6eb4dc53fecab |
User & Date: | danielk1977 2007-05-24 09:20:16 |
Context
2007-05-24
| ||
09:41 | Remove an assert() statement that may not be true if an IO or malloc error has occured. (CVS 4037) check-in: 16c8e9c2 user: danielk1977 tags: trunk | |
09:20 | Fix a page reference leak that could occur after an IO error. (CVS 4036) check-in: d00c8242 user: danielk1977 tags: trunk | |
07:47 | Remove an incorrect assert() statement that was being triggered by ioerr tests run in utf-16 mode. (CVS 4035) check-in: c6575173 user: danielk1977 tags: trunk | |
Changes
Changes to src/btree.c.
5 5 ** a legal notice, here is a blessing: 6 6 ** 7 7 ** May you do good and not evil. 8 8 ** May you find forgiveness for yourself and forgive others. 9 9 ** May you share freely, never taking more than you give. 10 10 ** 11 11 ************************************************************************* 12 -** $Id: btree.c,v 1.387 2007/05/24 07:47:07 danielk1977 Exp $ 12 +** $Id: btree.c,v 1.388 2007/05/24 09:20:16 danielk1977 Exp $ 13 13 ** 14 14 ** This file implements a external (disk-based) database using BTrees. 15 15 ** See the header comment on "btreeInt.h" for additional information. 16 16 ** Including a description of file format and an overview of operation. 17 17 */ 18 18 #include "btreeInt.h" 19 19 ................................................................................ 4240 4240 #ifndef SQLITE_OMIT_AUTOVACUUM 4241 4241 /* If this is an auto-vacuum database, update the pointer map 4242 4242 ** with entries for the new page, and any pointer from the 4243 4243 ** cell on the page to an overflow page. 4244 4244 */ 4245 4245 if( pBt->autoVacuum ){ 4246 4246 rc = ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno); 4247 - if( rc!=SQLITE_OK ){ 4248 - return rc; 4247 + if( rc==SQLITE_OK ){ 4248 + rc = ptrmapPutOvfl(pNew, 0); 4249 4249 } 4250 - rc = ptrmapPutOvfl(pNew, 0); 4251 4250 if( rc!=SQLITE_OK ){ 4251 + releasePage(pNew); 4252 4252 return rc; 4253 4253 } 4254 4254 } 4255 4255 #endif 4256 4256 4257 4257 /* Release the reference to the new page and balance the parent page, 4258 4258 ** in case the divider cell inserted caused it to become overfull.