+ (long) id, e->e_dn, 0 );
+
+ /* add dn2id indices */
+ if ( be_issuffix( be, &e->e_nname ) ) {
+ pdn = slap_empty_bv;
+ } else {
+ dnParent( &e->e_nname, &pdn );
+ }
+ rc = bdb_dn2id_add( be, tid, &pdn, e );
+ if( rc != 0 && rc != DB_KEYEXIST ) {
+ Debug( LDAP_DEBUG_ANY,
+ "=> bdb_tool_entry_reindex: dn2id_add failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
+ goto done;
+ }
+
+ rc = bdb_index_entry_add( be, tid, e, e->e_attrs );