diff options
author | dan <dan@noemail.net> | 2009-08-17 15:16:19 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2009-08-17 15:16:19 +0000 |
commit | e1ab2193092623f4f826f9ac73aa05ac494c8982 (patch) | |
tree | d04e9edc60acf046539815235c0b0167ab5ec46f /src/os_unix.c | |
parent | 9ac06509f19101b9b9f563a659761e1ae1c6b78c (diff) | |
download | sqlite-e1ab2193092623f4f826f9ac73aa05ac494c8982.tar.gz sqlite-e1ab2193092623f4f826f9ac73aa05ac494c8982.zip |
Add tests to check that sqlite recovers from an error in sqlite3_initialize() correctly.
FossilOrigin-Name: 904a371c6c9d3f20332b37767b06161fa0a78113
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index bc0f32cde..00bbb538c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -42,8 +42,6 @@ ** * Locking primitives for the proxy uber-locking-method. (MacOSX only) ** * Definitions of sqlite3_vfs objects for all locking methods ** plus implementations of sqlite3_os_init() and sqlite3_os_end(). -** -** $Id: os_unix.c,v 1.254 2009/07/03 12:57:58 drh Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -5128,6 +5126,13 @@ int sqlite3_os_init(void){ }; unsigned int i; /* Loop counter */ +#ifdef SQLITE_TEST + /* This block is used by test code only to simulate the effect on sqlite + ** of returning an error from within the sqlite3_os_init() function. */ + int sqlite3TestFailOsInit(void); + if( sqlite3TestFailOsInit() ){ return SQLITE_ERROR; } +#endif + /* Register all VFSes defined in the aVfs[] array */ for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){ sqlite3_vfs_register(&aVfs[i], i==0); |