1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Move the malloc() failure simulation out of malloc.c and into a separate sqlite3_mem_methods interface. Still some related changes to come. (CVS 5250)

FossilOrigin-Name: d22cd2a59f472f4eaf80aa9f55fbff2514ca428d
This commit is contained in:
danielk1977
2008-06-19 18:17:49 +00:00
parent 55b0cf00ad
commit d09414cdd6
11 changed files with 208 additions and 105 deletions

View File

@@ -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.452 2008/06/19 01:03:18 drh Exp $
** $Id: main.c,v 1.453 2008/06/19 18:17:50 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1816,6 +1816,18 @@ int sqlite3_test_control(int op, ...){
break;
}
/*
** sqlite3_test_control(FAULT_INSTALL, isInstall)
**
** If the argument is non-zero, install the fault-simulation malloc layer
** as a wrapper around the currently installed implementation.
*/
case SQLITE_TESTCTRL_FAULT_INSTALL: {
int isInstall = va_arg(ap, int);
rc = sqlite3FaultsimInstall(isInstall);
break;
}
/*
** Save the current state of the PRNG.
*/