mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
tool_reindex now regenerates the dn2id index as well as the others.
This commit is contained in:
parent
999b3dad7b
commit
19c7fd49ca
@ -229,8 +229,18 @@ int bdb_tool_entry_reindex(
|
||||
Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_reindex( %ld, \"%s\" )\n",
|
||||
(long) id, e->e_dn, 0 );
|
||||
|
||||
/* add dn2id indices */
|
||||
rc = bdb_dn2id_add( be, tid, e->e_ndn, e->e_id );
|
||||
if( rc != 0 ) {
|
||||
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 );
|
||||
|
||||
done:
|
||||
if( bi->bi_txn ) {
|
||||
if( rc == 0 ) {
|
||||
rc = txn_commit( tid, 0 );
|
||||
@ -250,6 +260,5 @@ int bdb_tool_entry_reindex(
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
return rc;
|
||||
}
|
||||
|
@ -271,8 +271,10 @@ int ldbm_tool_entry_reindex(
|
||||
id, e->e_dn, 0 );
|
||||
#endif
|
||||
|
||||
|
||||
rc = index_entry_add( be, e, e->e_attrs );
|
||||
rc = dn2id_add( be, e->e_ndn, e->e_id );
|
||||
if( rc == 0 ) {
|
||||
rc = index_entry_add( be, e, e->e_attrs );
|
||||
}
|
||||
|
||||
entry_free( e );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user