+ (long) id, e->e_dn, 0 );
+#endif
+
+ /* 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 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( TOOLS, ERR,
+ "=> bdb_tool_entry_reindex: dn2id_add failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "=> bdb_tool_entry_reindex: dn2id_add failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
+#endif
+ goto done;
+ }
+
+ rc = bdb_index_entry_add( be, tid, e, e->e_attrs );