aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c9
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);