mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Use MDB_APPEND mode where possible
This commit is contained in:
parent
02cafebb8e
commit
8a8fb76cca
@ -199,7 +199,7 @@ mdb_dn2id_add(
|
||||
memcpy( ptr, &pid, sizeof( ID ));
|
||||
d->nrdnlen[0] ^= 0x80;
|
||||
|
||||
rc = mdb_cursor_put( mc, &key, &data, MDB_NODUPDATA );
|
||||
rc = mdb_cursor_put( mc, &key, &data, MDB_NODUPDATA|MDB_APPEND );
|
||||
}
|
||||
mdb_cursor_close( mc );
|
||||
|
||||
|
@ -92,7 +92,7 @@ int mdb_id2entry_add(
|
||||
MDB_txn *tid,
|
||||
Entry *e )
|
||||
{
|
||||
return mdb_id2entry_put(op, tid, e, MDB_NOOVERWRITE);
|
||||
return mdb_id2entry_put(op, tid, e, MDB_NOOVERWRITE|MDB_APPEND);
|
||||
}
|
||||
|
||||
int mdb_id2entry_update(
|
||||
|
@ -996,7 +996,7 @@ setrange:
|
||||
for ( i=0; i<end; i++ ) {
|
||||
if ( !ice->ids[i] ) continue;
|
||||
data.mv_data = &ice->ids[i];
|
||||
rc = mdb_cursor_put( mc, &key, &data, MDB_NODUPDATA );
|
||||
rc = mdb_cursor_put( mc, &key, &data, MDB_NODUPDATA|MDB_APPEND );
|
||||
if ( rc ) {
|
||||
if ( rc == MDB_KEYEXIST ) {
|
||||
rc = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user