/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2009 The OpenLDAP Foundation.
+ * Copyright 2000-2011 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
"Run manual recovery if errors are encountered.\n",
be->be_suffix[0].bv_val, 0, 0 );
do_recover = 0;
+ do_alock_recover = 0;
quick = alockt;
}
}
#endif
- /* Default dncache to 2x entrycache */
- if ( bdb->bi_cache.c_maxsize && !bdb->bi_cache.c_eimax ) {
- bdb->bi_cache.c_eimax = bdb->bi_cache.c_maxsize * 2;
+ /* dncache defaults to 0 == unlimited
+ * must be >= entrycache
+ */
+ if ( bdb->bi_cache.c_eimax && bdb->bi_cache.c_eimax < bdb->bi_cache.c_maxsize ) {
+ bdb->bi_cache.c_eimax = bdb->bi_cache.c_maxsize;
}
if ( bdb->bi_idl_cache_max_size ) {
rc = bdb_id2entry( be, NULL, 0, &e );
}
if ( !e ) {
+ struct berval gluebv = BER_BVC("glue");
+ Operation op = {0};
+ Opheader ohdr = {0};
e = entry_alloc();
e->e_id = 0;
ber_dupbv( &e->e_name, (struct berval *)&slap_empty_bv );
ber_dupbv( &e->e_nname, (struct berval *)&slap_empty_bv );
+ attr_merge_one( e, slap_schema.si_ad_objectClass,
+ &gluebv, NULL );
+ attr_merge_one( e, slap_schema.si_ad_structuralObjectClass,
+ &gluebv, NULL );
+ op.o_hdr = &ohdr;
+ op.o_bd = be;
+ op.ora_e = e;
+ op.o_dn = be->be_rootdn;
+ op.o_ndn = be->be_rootndn;
+ slap_add_opattrs( &op, NULL, NULL, 0, 0 );
}
e->e_ocflags = SLAP_OC_GLUE|SLAP_OC__END;
e->e_private = &bdb->bi_cache.c_dntree;
*/
bi->bi_tool_entry_open = bdb_tool_entry_open;
bi->bi_tool_entry_close = bdb_tool_entry_close;
- bi->bi_tool_entry_first = bdb_tool_entry_next;
+ bi->bi_tool_entry_first = backend_tool_entry_first;
+ bi->bi_tool_entry_first_x = bdb_tool_entry_first_x;
bi->bi_tool_entry_next = bdb_tool_entry_next;
bi->bi_tool_entry_get = bdb_tool_entry_get;
bi->bi_tool_entry_put = bdb_tool_entry_put;