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

Update PRAGMA integrity_check so that it treats SQLITE_IOERR_NOMEM errors

from underlying components the same as SQLITE_NOMEM errors. (CVS 6587)

FossilOrigin-Name: 26444f2a4426d2e51464ef69ed83d3c78be2c11f
This commit is contained in:
drh
2009-05-01 13:16:54 +00:00
parent ff340d8e39
commit b56cd55b9a
3 changed files with 11 additions and 11 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.602 2009/04/30 13:30:33 drh Exp $
** $Id: btree.c,v 1.603 2009/05/01 13:16:55 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -7043,7 +7043,7 @@ static void checkPtrmap(
rc = ptrmapGet(pCheck->pBt, iChild, &ePtrmapType, &iPtrmapParent);
if( rc!=SQLITE_OK ){
if( rc==SQLITE_NOMEM ) pCheck->mallocFailed = 1;
if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) pCheck->mallocFailed = 1;
checkAppendMsg(pCheck, zContext, "Failed to read ptrmap key=%d", iChild);
return;
}
@@ -7170,7 +7170,7 @@ static int checkTreePage(
if( iPage==0 ) return 0;
if( checkRef(pCheck, iPage, zParentContext) ) return 0;
if( (rc = sqlite3BtreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
if( rc==SQLITE_NOMEM ) pCheck->mallocFailed = 1;
if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) pCheck->mallocFailed = 1;
checkAppendMsg(pCheck, zContext,
"unable to get the page. error code=%d", rc);
return 0;