bdb_db_init( BackendDB *be )
{
struct bdb_info *bdb;
+ int rc;
Debug( LDAP_DEBUG_TRACE,
LDAP_XSTRING(bdb_db_init) ": Initializing " BDB_UCTYPE " database\n",
be->be_private = bdb;
be->be_cf_ocs = be->bd_info->bi_cf_ocs;
- return 0;
+ rc = bdb_monitor_db_init( be );
+
+ return rc;
}
static int
u_int32_t flags;
char path[MAXPATHLEN];
char *dbhome;
- int do_recover = 0, do_alock_recover = 0, open_env = 1;
+ int do_recover = 0, do_alock_recover = 0;
int alockt, quick = 0;
if ( be->be_suffix == NULL ) {
XLOCK_ID(bdb->bi_dbenv, &bdb->bi_cache.c_locker);
}
+ /* monitor setup */
+ rc = bdb_monitor_db_open( be );
+ if ( rc != 0 ) {
+ goto fail;
+ }
+
bdb->bi_flags |= BDB_IS_OPEN;
+ entry_prealloc( bdb->bi_cache.c_maxsize );
+ attr_prealloc( bdb->bi_cache.c_maxsize * 20 );
return 0;
fail:
struct bdb_db_info *db;
bdb_idl_cache_entry_t *entry, *next_entry;
+ /* monitor handling */
+ (void)bdb_monitor_db_close( be );
+
bdb->bi_flags &= ~BDB_IS_OPEN;
ber_bvarray_free( bdb->bi_db_config );
{
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
+ /* monitor handling */
+ (void)bdb_monitor_db_close( be );
+
if( bdb->bi_dbenv_home ) ch_free( bdb->bi_dbenv_home );
if( bdb->bi_db_config_path ) ch_free( bdb->bi_db_config_path );
LDAP_CONTROL_MANAGEDSAIT,
LDAP_CONTROL_NOOP,
LDAP_CONTROL_PAGEDRESULTS,
+ LDAP_CONTROL_PRE_READ,
+ LDAP_CONTROL_POST_READ,
LDAP_CONTROL_SUBENTRIES,
LDAP_CONTROL_X_PERMISSIVE_MODIFY,
#ifdef LDAP_X_TXN