1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Merge all recent changes from trunk, and especially the new sqlite3FaultSim()

interface.

FossilOrigin-Name: 43fcbd9116401f30781fdcbe55d1674d6b96311b
This commit is contained in:
drh
2014-05-16 14:27:05 +00:00
12 changed files with 345 additions and 65 deletions

View File

@@ -3124,6 +3124,23 @@ int sqlite3_test_control(int op, ...){
break;
}
/*
** sqlite3_test_control(FAULT_INSTALL, xCallback)
**
** Arrange to invoke xCallback() whenever sqlite3FaultSim() is called,
** if xCallback is not NULL.
**
** As a test of the fault simulator mechanism itself, sqlite3FaultSim(0)
** is called immediately after installing the new callback and the return
** value from sqlite3FaultSim(0) becomes the return from
** sqlite3_test_control().
*/
case SQLITE_TESTCTRL_FAULT_INSTALL: {
sqlite3Config.xTestCallback = va_arg(ap, int(*)(int));
rc = sqlite3FaultSim(0);
break;
}
/*
** sqlite3_test_control(BENIGN_MALLOC_HOOKS, xBegin, xEnd)
**