1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Catch another case where SQLITE_IOERR could be returned instead of SQLITE_NOMEM following an out-of-memory error. (CVS 5739)

FossilOrigin-Name: 18d030da0c1755aab458e5aa0d3ad0a714706d67
This commit is contained in:
danielk1977
2008-09-23 17:39:26 +00:00
parent 98c21903bd
commit 45e60aabc6
3 changed files with 11 additions and 8 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.501 2008/09/22 17:22:20 danielk1977 Exp $
** $Id: main.c,v 1.502 2008/09/23 17:39:26 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1534,6 +1534,9 @@ static int openDatabase(
flags | SQLITE_OPEN_MAIN_DB,
&db->aDb[0].pBt);
if( rc!=SQLITE_OK ){
if( rc==SQLITE_IOERR_NOMEM ){
rc = SQLITE_NOMEM;
}
sqlite3Error(db, rc, 0);
goto opendb_out;
}