mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321)
FossilOrigin-Name: e38ef81b85feb5bff2ad8448f3438ff0ab36571e
This commit is contained in:
@@ -115,15 +115,13 @@ static void resizeOpArray(Vdbe *p, int N){
|
||||
VdbeOp *pNew;
|
||||
int nNew = N + 100*(!runMode);
|
||||
int oldSize = p->nOpAlloc;
|
||||
pNew = sqlite3_realloc(p->aOp, nNew*sizeof(Op));
|
||||
pNew = sqlite3DbRealloc(p->db, p->aOp, nNew*sizeof(Op));
|
||||
if( pNew ){
|
||||
p->nOpAlloc = nNew;
|
||||
p->aOp = pNew;
|
||||
if( nNew>oldSize ){
|
||||
memset(&p->aOp[oldSize], 0, (nNew-oldSize)*sizeof(Op));
|
||||
}
|
||||
}else{
|
||||
p->db->mallocFailed = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user