Skip to content
Snippets Groups Projects
Commit aef1fac4 authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#7090 fix out-of-order slapadd

parent 5da8d3ed
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ static int mdb_entry_encode(Operation *op, Entry *e, MDB_val *data,
Ecount *ec);
static Entry *mdb_entry_alloc( Operation *op, int nattrs, int nvals );
#define ADD_FLAGS (MDB_NOOVERWRITE|MDB_APPEND)
static int mdb_id2entry_put(
Operation *op,
MDB_txn *txn,
......@@ -72,7 +74,7 @@ again:
if (rc) {
/* Was there a hole from slapadd? */
if ( (flag & MDB_NOOVERWRITE) && data.mv_size == 0 ) {
flag ^= MDB_NOOVERWRITE;
flag ^= ADD_FLAGS;
goto again;
}
Debug( LDAP_DEBUG_ANY,
......@@ -97,7 +99,7 @@ int mdb_id2entry_add(
MDB_cursor *mc,
Entry *e )
{
return mdb_id2entry_put(op, txn, mc, e, MDB_NOOVERWRITE|MDB_APPEND);
return mdb_id2entry_put(op, txn, mc, e, ADD_FLAGS);
}
int mdb_id2entry_update(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment