mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Have the VFS in memdb.c return SQLITE_IOERR_NOMEM instead of SQLITE_NOMEM when an OOM error is encountered. This is required to get the pager module to handle such OOM errors correctly in some cases.
FossilOrigin-Name: 09c96b4c026746f285a8aef5199bd247ecca590095ee42dde4f4dfa4996ce0bd
This commit is contained in:
@@ -170,7 +170,7 @@ static int memdbEnlarge(MemFile *p, sqlite3_int64 newSz){
|
||||
newSz *= 2;
|
||||
if( newSz>p->szMax ) newSz = p->szMax;
|
||||
pNew = sqlite3Realloc(p->aData, newSz);
|
||||
if( pNew==0 ) return SQLITE_NOMEM;
|
||||
if( pNew==0 ) return SQLITE_IOERR_NOMEM;
|
||||
p->aData = pNew;
|
||||
p->szAlloc = newSz;
|
||||
return SQLITE_OK;
|
||||
|
Reference in New Issue
Block a user