diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-06-19 18:17:49 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-06-19 18:17:49 +0000 |
commit | d09414cdd60e8c30eb15e4758b8289efbe4cdedd (patch) | |
tree | d86848b8fa02eb4ee3265d6a5d384179585de5f0 /src/main.c | |
parent | 55b0cf00ad16da59d56358e0073627ae03a3ffa5 (diff) | |
download | sqlite-d09414cdd60e8c30eb15e4758b8289efbe4cdedd.tar.gz sqlite-d09414cdd60e8c30eb15e4758b8289efbe4cdedd.zip |
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
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 870b9f30f..825d1ed01 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.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> @@ -1817,6 +1817,18 @@ int sqlite3_test_control(int op, ...){ } /* + ** 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. */ case SQLITE_TESTCTRL_PRNG_SAVE: { |