aboutsummaryrefslogtreecommitdiff
path: root/src/bitvec.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2008-05-13 13:27:33 +0000
committerdrh <drh@noemail.net>2008-05-13 13:27:33 +0000
commit4873d5f61475c24118a6ac616c0fb87f13778cce (patch)
tree50e48613855644548e1332943dd1e2b05b56a800 /src/bitvec.c
parentd138c0168f64a84f57d11f3247a3a93388c8f364 (diff)
downloadsqlite-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/bitvec.c')
-rw-r--r--src/bitvec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bitvec.c b/src/bitvec.c
index c8b8e200b..90c90662f 100644
--- a/src/bitvec.c
+++ b/src/bitvec.c
@@ -32,7 +32,7 @@
** start of a transaction, and is thus usually less than a few thousand,
** but can be as large as 2 billion for a really big database.
**
-** @(#) $Id: bitvec.c,v 1.4 2008/04/14 01:00:58 drh Exp $
+** @(#) $Id: bitvec.c,v 1.5 2008/05/13 13:27:34 drh Exp $
*/
#include "sqliteInt.h"
@@ -140,9 +140,9 @@ int sqlite3BitvecSet(Bitvec *p, u32 i){
u32 bin = (i-1)/p->iDivisor;
i = (i-1)%p->iDivisor + 1;
if( p->u.apSub[bin]==0 ){
- sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, 1);
+ sqlite3FaultBeginBenign(SQLITE_FAULTINJECTOR_MALLOC);
p->u.apSub[bin] = sqlite3BitvecCreate( p->iDivisor );
- sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, 0);
+ sqlite3FaultEndBenign(SQLITE_FAULTINJECTOR_MALLOC);
if( p->u.apSub[bin]==0 ) return SQLITE_NOMEM;
}
return sqlite3BitvecSet(p->u.apSub[bin], i);