mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
Use DB_NODUPDATA when adding IDs. Silence log for DB_NOTFOUND in delete_key,
let caller log it if they care.
This commit is contained in:
parent
9d4f5e13e8
commit
4a3a557827
@ -572,7 +572,7 @@ bdb_idl_insert_key(
|
||||
}
|
||||
} else if ( rc == DB_NOTFOUND ) {
|
||||
put1: data.data = &id;
|
||||
rc = cursor->c_put( cursor, key, &data, DB_KEYFIRST );
|
||||
rc = cursor->c_put( cursor, key, &data, DB_NODUPDATA );
|
||||
/* Don't worry if it's already there */
|
||||
if ( rc != 0 && rc != DB_KEYEXIST ) {
|
||||
err = "c_put id";
|
||||
@ -827,6 +827,7 @@ bdb_idl_delete_key(
|
||||
} else {
|
||||
/* initial c_get failed, nothing was done */
|
||||
fail:
|
||||
if ( rc != DB_NOTFOUND ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( INDEX, ERR,
|
||||
"bdb_idl_delete_key: %s failed: %s (%d)\n",
|
||||
@ -835,6 +836,7 @@ fail:
|
||||
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_delete_key: "
|
||||
"%s failed: %s (%d)\n", err, db_strerror(rc), rc );
|
||||
#endif
|
||||
}
|
||||
cursor->c_close( cursor );
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user