mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user