From 4077211117db159149a8f9d0862e48e006e63032 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 18 Sep 2000 20:03:41 +0000 Subject: [PATCH] Fix up back-bdb framework --- configure | 4 +++- configure.in | 1 + servers/slapd/back-bdb/back-bdb.h | 10 ++++------ servers/slapd/back-bdb/init.c | 5 +++++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/configure b/configure index f9ee2cb116..f36b70ea2e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # $OpenLDAP$ -# from OpenLDAP: pkg/ldap/configure.in,v 1.330 2000/09/15 01:27:25 kurt Exp +# from OpenLDAP: pkg/ldap/configure.in,v 1.331 2000/09/18 17:02:09 kurt Exp # Copyright 1998-2000 The OpenLDAP Foundation. All Rights Reserved. # @@ -16208,6 +16208,7 @@ fi + @@ -16442,6 +16443,7 @@ s%@BUILD_PERL@%$BUILD_PERL%g s%@BUILD_SHELL@%$BUILD_SHELL%g s%@BUILD_SQL@%$BUILD_SQL%g s%@BUILD_TCL@%$BUILD_TCL%g +s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g diff --git a/configure.in b/configure.in index ded39a57a2..1dc6f7b677 100644 --- a/configure.in +++ b/configure.in @@ -2387,6 +2387,7 @@ AC_SUBST(BUILD_SLAPD) AC_SUBST(BUILD_SHELL) AC_SUBST(BUILD_SQL) AC_SUBST(BUILD_TCL) + AC_SUBST(BUILD_BDB_DYNAMIC) AC_SUBST(BUILD_DNSSRV_DYNAMIC) AC_SUBST(BUILD_LDAP_DYNAMIC) AC_SUBST(BUILD_LDBM_DYNAMIC) diff --git a/servers/slapd/back-bdb/back-bdb.h b/servers/slapd/back-bdb/back-bdb.h index 63963ce157..b3601e89c6 100644 --- a/servers/slapd/back-bdb/back-bdb.h +++ b/servers/slapd/back-bdb/back-bdb.h @@ -13,17 +13,15 @@ LDAP_BEGIN_DECL -#define DEFAULT_MODE 0600 -#define DEFAULT_CACHE_SIZE 1000 - -#define DEFAULT_DBCACHE_SIZE (100 * DEFAULT_DB_PAGE_SIZE) +#define SLAPD_BDB_PRIVATE -#define DEFAULT_DB_DIRECTORY LDAP_RUNDIR LDAP_DIRSEP "openldap-bdb" +#define DEFAULT_MODE 0600 #define DEFAULT_DBENV_HOME LDAP_RUNDIR LDAP_DIRSEP "openldap-bdb-home" #define DEFAULT_DBENV_MODE DEFAULT_MODE -#define DEFAULT_BLOCKSIZE 8192 +#define DEFAULT_DB_DIRECTORY LDAP_RUNDIR LDAP_DIRSEP "openldap-bdb" +#define DEFAULT_DB_MODE DEFAULT_MODE struct bdb_dbinfo { DB_ENV *bdi_dbenv; diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 3941f4f939..a31a5f62a1 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -174,8 +174,13 @@ bdb_back_db_open( return rc; } +#ifdef SLAPD_BDB_PRIVATE flags = DB_INIT_LOCK | DB_INIT_TXN | DB_PRIVATE | DB_RECOVER | DB_THREAD; +#else + flags = DB_INIT_LOCK | DB_INIT_TXN | DB_INIT_MPOOL | + DB_RECOVER | DB_THREAD; +#endif rc = bdi->bdi_dbenv->open( bdi->bdi_dbenv, bdi->bdi_dbenv_home, -- 2.39.5