1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Add tests to check that sqlite recovers from an error in sqlite3_initialize() correctly.

FossilOrigin-Name: 904a371c6c9d3f20332b37767b06161fa0a78113
This commit is contained in:
dan
2009-08-17 15:16:19 +00:00
parent 9ac06509f1
commit e1ab219309
11 changed files with 414 additions and 42 deletions

View File

@@ -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);