diff options
author | dan <Dan Kennedy> | 2021-04-09 20:50:40 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2021-04-09 20:50:40 +0000 |
commit | a3a91dd5f182acb63de3ad45e2b53b9abd0d1ee7 (patch) | |
tree | 5c412b3099a1c2e6b0e172b3da95ce0da5239b8b /src | |
parent | bfd6f1bcd5d7744d830e70b7bc72a27011a5e2b5 (diff) | |
download | sqlite-a3a91dd5f182acb63de3ad45e2b53b9abd0d1ee7.tar.gz sqlite-a3a91dd5f182acb63de3ad45e2b53b9abd0d1ee7.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/memdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memdb.c b/src/memdb.c index a48980aa3..b25e13cbc 100644 --- a/src/memdb.c +++ b/src/memdb.c @@ -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; |