Really fix ITS#2905

This commit is contained in:
Howard Chu 2004-01-12 04:09:52 +00:00
parent 778516cc8c
commit a8dbfd322a

View File

@ -265,9 +265,8 @@ static int bdb_tool_next_id(
} else if ( !hole ) { } else if ( !hole ) {
unsigned i; unsigned i;
if ( e->e_id == NOID ) { e->e_id = ei->bei_id;
return DB_KEYEXIST; rc = DB_KEYEXIST;
}
for ( i=0; i<nholes; i++) { for ( i=0; i<nholes; i++) {
if ( holes[i].id == e->e_id ) { if ( holes[i].id == e->e_id ) {
@ -276,6 +275,7 @@ static int bdb_tool_next_id(
for (j=i;j<nholes;j++) holes[j] = holes[j+1]; for (j=i;j<nholes;j++) holes[j] = holes[j+1];
holes[j].id = 0; holes[j].id = 0;
nholes--; nholes--;
rc = 0;
break; break;
} else if ( holes[i].id > e->e_id ) { } else if ( holes[i].id > e->e_id ) {
break; break;