1
0
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:
dan
2021-04-09 20:50:40 +00:00
parent bfd6f1bcd5
commit a3a91dd5f1
3 changed files with 8 additions and 8 deletions

View File

@@ -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;