mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-10 00:45:01 -05:00
Do not set db_cachesize under BerkeleyDB 2.4.
This commit is contained in:
parent
4c3f2c9fa9
commit
4b832f1d35
1 changed files with 11 additions and 0 deletions
|
|
@ -169,8 +169,19 @@ ldbm_open( char *name, int rw, int mode, int dbcachesize )
|
|||
DB_INFO dbinfo;
|
||||
|
||||
memset( &dbinfo, 0, sizeof( dbinfo ));
|
||||
|
||||
#if defined( DB_VERSION_MAJOR ) && defined( DB_VERSION_MINOR ) && \
|
||||
DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 4
|
||||
/*
|
||||
* BerkeleyDB 2.4 do not allow db_cachesize
|
||||
* to be specified if an DB_ENV is.
|
||||
*/
|
||||
#else
|
||||
/* set db_cachesize of MPOOL is NOT being used. */
|
||||
if (( ldbm_Env == NULL ) || ( ldbm_Env->mp_info == NULL ))
|
||||
dbinfo.db_cachesize = dbcachesize;
|
||||
#endif
|
||||
|
||||
dbinfo.db_pagesize = DEFAULT_DB_PAGE_SIZE;
|
||||
dbinfo.db_malloc = ldbm_malloc;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue