diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index 93231fefbc..e73f7c70db 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -265,9 +265,8 @@ static int bdb_tool_next_id( } else if ( !hole ) { unsigned i; - if ( e->e_id == NOID ) { - return DB_KEYEXIST; - } + e->e_id = ei->bei_id; + rc = DB_KEYEXIST; for ( i=0; ie_id ) { @@ -276,6 +275,7 @@ static int bdb_tool_next_id( for (j=i;j e->e_id ) { break;