mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-23 14:09:39 +08:00
Sync detection with use. Don't use DB_CDB_ALLDB. Causes hang.
This commit is contained in:
parent
d397f6aa2f
commit
ea4bf672cc
@ -352,6 +352,7 @@ main()
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
#ifdef DB_CDB_ALLDB
|
#ifdef DB_CDB_ALLDB
|
||||||
rc = env->set_flags( env, DB_CDB_ALLDB, 1 );
|
rc = env->set_flags( env, DB_CDB_ALLDB, 1 );
|
||||||
|
|
||||||
@ -360,6 +361,7 @@ main()
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
|
#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
|
||||||
rc = env->open( env, NULL, flags, 0 );
|
rc = env->open( env, NULL, flags, 0 );
|
||||||
|
@ -224,15 +224,19 @@ DB_ENV *ldbm_initialize_env(const char *home, int dbcachesize, int *envdirok)
|
|||||||
int err;
|
int err;
|
||||||
u_int32_t envFlags;
|
u_int32_t envFlags;
|
||||||
|
|
||||||
envFlags =
|
envFlags = DB_CREATE |
|
||||||
#if defined( DB_PRIVATE ) /* comment out DB_PRIVATE setting to use */
|
#if defined( DB_PRIVATE ) /* comment out DB_PRIVATE setting to use */
|
||||||
DB_PRIVATE | /* db_stat to view cache behavior */
|
DB_PRIVATE | /* db_stat to view cache behavior */
|
||||||
#endif
|
#endif
|
||||||
#if defined( HAVE_BERKELEY_DB_THREAD )
|
DB_USE_ENVIRON;
|
||||||
DB_THREAD |
|
|
||||||
|
#ifdef HAVE_BERKELEY_DB_THREAD
|
||||||
|
envFlags |= DB_THREAD | DB_INIT_CDB | DB_INIT_MPOOL;
|
||||||
|
#ifdef DB_MPOOL_PRIVATE
|
||||||
|
envFlags |= DB_MPOOL_PRIVATE;
|
||||||
#endif
|
#endif
|
||||||
DB_CREATE;
|
#endif
|
||||||
|
|
||||||
err = db_env_create( &env, 0 );
|
err = db_env_create( &env, 0 );
|
||||||
|
|
||||||
if ( err ) {
|
if ( err ) {
|
||||||
@ -251,7 +255,11 @@ DB_ENV *ldbm_initialize_env(const char *home, int dbcachesize, int *envdirok)
|
|||||||
if (dbcachesize)
|
if (dbcachesize)
|
||||||
env->set_cachesize( env, 0, dbcachesize, 0 );
|
env->set_cachesize( env, 0, dbcachesize, 0 );
|
||||||
|
|
||||||
envFlags |= DB_INIT_MPOOL | DB_INIT_CDB | DB_USE_ENVIRON;
|
#if 0
|
||||||
|
#if defined( DB_CDB_ALLDB ) && defined( HAVE_BERKELEY_DB_THREAD )
|
||||||
|
env->set_flags( env, DB_CDB_ALLDB, 1 );
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if DB_VERSION_MAJOR > 3 || DB_VERSION_MINOR > 0
|
#if DB_VERSION_MAJOR > 3 || DB_VERSION_MINOR > 0
|
||||||
err = env->open( env, home, envFlags, 0 );
|
err = env->open( env, home, envFlags, 0 );
|
||||||
|
Loading…
Reference in New Issue
Block a user