mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-03 05:30:07 -05:00
ITS#9712 back-mdb: fix multival delete
This commit is contained in:
parent
397e30a5e7
commit
74a5a3a474
1 changed files with 4 additions and 1 deletions
|
|
@ -55,6 +55,8 @@ mdb_id2v_compare(
|
|||
return -1;
|
||||
if (ui > ci)
|
||||
return 1;
|
||||
if (usrkey->mv_size < curkey->mv_size)
|
||||
return 0;
|
||||
uv = usrkey->mv_data;
|
||||
cv = curkey->mv_data;
|
||||
return uv[sizeof(ID)/2] - cv[sizeof(ID)/2];
|
||||
|
|
@ -490,7 +492,8 @@ int mdb_id2entry_delete(
|
|||
return rc;
|
||||
rc = mdb_cursor_get( mvc, &key, NULL, MDB_GET_CURRENT );
|
||||
if (rc) {
|
||||
if (rc == MDB_NOTFOUND)
|
||||
/* no record or DB is empty */
|
||||
if (rc == MDB_NOTFOUND || rc == EINVAL)
|
||||
rc = MDB_SUCCESS;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue