Ignore DB_KEYEXIST and DB_NOTFOUND errors in key_change.
/* store the key */
rc = db->put( db, tid, key, &data, 0 );
#endif
- if( rc == DB_KEYEXIST ) rc = 0;
-
- if( rc != 0 ) {
+ if( rc != 0 && rc != DB_KEYEXIST ) {
#ifdef NEW_LOGGING
LDAP_LOG( INDEX, ERR,
"bdb_idl_insert_key: put failed: %s (%d)\n",
if (op == SLAP_INDEX_ADD_OP) {
/* Add values */
rc = bdb_idl_insert_key( be, db, txn, &key, id );
-
+ if ( rc == DB_KEYEXIST ) rc = 0;
} else {
/* Delete values */
rc = bdb_idl_delete_key( be, db, txn, &key, id );
+ if ( rc == DB_NOTFOUND ) rc = 0;
}
#ifdef NEW_LOGGING