mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Don't mask DB_KEYEXIST errors in bdb_idl_insert_key, let dn2id see them.
Ignore DB_KEYEXIST and DB_NOTFOUND errors in key_change.
This commit is contained in:
parent
d11b134709
commit
f32803e738
@ -657,9 +657,7 @@ fail:
|
|||||||
/* store the key */
|
/* store the key */
|
||||||
rc = db->put( db, tid, key, &data, 0 );
|
rc = db->put( db, tid, key, &data, 0 );
|
||||||
#endif
|
#endif
|
||||||
if( rc == DB_KEYEXIST ) rc = 0;
|
if( rc != 0 && rc != DB_KEYEXIST ) {
|
||||||
|
|
||||||
if( rc != 0 ) {
|
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
LDAP_LOG( INDEX, ERR,
|
LDAP_LOG( INDEX, ERR,
|
||||||
"bdb_idl_insert_key: put failed: %s (%d)\n",
|
"bdb_idl_insert_key: put failed: %s (%d)\n",
|
||||||
|
@ -92,10 +92,11 @@ bdb_key_change(
|
|||||||
if (op == SLAP_INDEX_ADD_OP) {
|
if (op == SLAP_INDEX_ADD_OP) {
|
||||||
/* Add values */
|
/* Add values */
|
||||||
rc = bdb_idl_insert_key( be, db, txn, &key, id );
|
rc = bdb_idl_insert_key( be, db, txn, &key, id );
|
||||||
|
if ( rc == DB_KEYEXIST ) rc = 0;
|
||||||
} else {
|
} else {
|
||||||
/* Delete values */
|
/* Delete values */
|
||||||
rc = bdb_idl_delete_key( be, db, txn, &key, id );
|
rc = bdb_idl_delete_key( be, db, txn, &key, id );
|
||||||
|
if ( rc == DB_NOTFOUND ) rc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
|
Loading…
Reference in New Issue
Block a user