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

Return an appropriate out-of-memory message when sqlite3_errmsg() is called

following an SQLITE_NOMEM error. (CVS 6001)

FossilOrigin-Name: 228ebe4115cfb2deafd504a52a230bf646fcd8f1
This commit is contained in:
drh
2008-12-09 14:46:09 +00:00
parent cd2b561302
commit e862f03f5f
3 changed files with 9 additions and 9 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.515 2008/12/08 21:37:15 drh Exp $
** $Id: main.c,v 1.516 2008/12/09 14:46:10 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1201,7 +1201,7 @@ int sqlite3BtreeFactory(
*/
const char *sqlite3_errmsg(sqlite3 *db){
const char *z;
if( !db ){
if( !db || db->mallocFailed ){
return sqlite3ErrStr(SQLITE_NOMEM);
}
if( !sqlite3SafetyCheckSickOrOk(db) ){