diff options
author | drh <drh@noemail.net> | 2008-05-13 13:27:33 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-05-13 13:27:33 +0000 |
commit | 4873d5f61475c24118a6ac616c0fb87f13778cce (patch) | |
tree | 50e48613855644548e1332943dd1e2b05b56a800 /src/main.c | |
parent | d138c0168f64a84f57d11f3247a3a93388c8f364 (diff) | |
download | sqlite-4873d5f61475c24118a6ac616c0fb87f13778cce.tar.gz sqlite-4873d5f61475c24118a6ac616c0fb87f13778cce.zip |
Make the benign-fault setting recursive. Make all malloc failures
during a rollback benign since there is nothing we can do about them. (CVS 5128)
FossilOrigin-Name: a9d1d931358637a6f039723a053098f65530de4b
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c index 668db1255..9f2ff1b90 100644 --- a/src/main.c +++ b/src/main.c @@ -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.438 2008/05/05 16:56:35 drh Exp $ +** $Id: main.c,v 1.439 2008/05/13 13:27:34 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -254,7 +254,7 @@ void sqlite3RollbackAll(sqlite3 *db){ int i; int inTrans = 0; assert( sqlite3_mutex_held(db->mutex) ); - sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, 1); + sqlite3FaultBeginBenign(SQLITE_FAULTINJECTOR_MALLOC); for(i=0; i<db->nDb; i++){ if( db->aDb[i].pBt ){ if( sqlite3BtreeIsInTrans(db->aDb[i].pBt) ){ @@ -265,7 +265,7 @@ void sqlite3RollbackAll(sqlite3 *db){ } } sqlite3VtabRollback(db); - sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, 0); + sqlite3FaultEndBenign(SQLITE_FAULTINJECTOR_MALLOC); if( db->flags&SQLITE_InternChanges ){ sqlite3ExpirePreparedStatements(db); |