diff options
author | drh <drh@noemail.net> | 2011-10-29 01:33:24 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-10-29 01:33:24 +0000 |
commit | 81bdd6db5445329a33eed0da907bb2e4fe9f079a (patch) | |
tree | e31cd021ad707230bc21e16da7a3422748ebf232 /src | |
parent | 029ead645d5f5675ea0534a1d23ac1382f926e5e (diff) | |
download | sqlite-81bdd6db5445329a33eed0da907bb2e4fe9f079a.tar.gz sqlite-81bdd6db5445329a33eed0da907bb2e4fe9f079a.zip |
Avoid reporting a NOMEM error if a memory allocation fails while copying
the error message from a prepared statement into the database connection.
FossilOrigin-Name: dcb78793474e533c3e4f5c6389ba3c997f062eee
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbeaux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 931114e62..75250238e 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -2322,9 +2322,11 @@ int sqlite3VdbeTransferError(Vdbe *p){ sqlite3 *db = p->db; int rc = p->rc; if( p->zErrMsg ){ + u8 mallocFailed = db->mallocFailed; sqlite3BeginBenignMalloc(); sqlite3ValueSetStr(db->pErr, -1, p->zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT); sqlite3EndBenignMalloc(); + db->mallocFailed = mallocFailed; db->errCode = rc; }else{ sqlite3Error(db, rc, 0); |