mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
Fix conversion of IDL to range
This commit is contained in:
parent
f7a0fc9f8b
commit
d38ef26425
1 changed files with 4 additions and 3 deletions
|
|
@ -445,14 +445,15 @@ mdb_idl_insert_key(
|
|||
err = "c_get next_nodup";
|
||||
goto fail;
|
||||
}
|
||||
key2 = *key;
|
||||
if ( rc == MDB_NOTFOUND ) {
|
||||
rc = mdb_cursor_get( cursor, key, &data, MDB_LAST );
|
||||
rc = mdb_cursor_get( cursor, &key2, &data, MDB_LAST );
|
||||
if ( rc != 0 ) {
|
||||
err = "c_get last";
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
rc = mdb_cursor_get( cursor, key, &data, MDB_PREV );
|
||||
rc = mdb_cursor_get( cursor, &key2, &data, MDB_PREV );
|
||||
if ( rc != 0 ) {
|
||||
err = "c_get prev";
|
||||
goto fail;
|
||||
|
|
@ -467,7 +468,7 @@ mdb_idl_insert_key(
|
|||
hi = id;
|
||||
}
|
||||
/* delete the old key */
|
||||
rc = mdb_del( txn, dbi, key, NULL );
|
||||
rc = mdb_del( txn, dbi, &key2, NULL );
|
||||
if ( rc != 0 ) {
|
||||
err = "mdb_del";
|
||||
goto fail;
|
||||
|
|
|
|||
Loading…
Reference in a new issue