/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2011-2013 The OpenLDAP Foundation.
+ * Copyright 2011-2014 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
}
}
}
- rc = mdb_entry_decode( &op, &data, &e );
+ rc = mdb_entry_decode( &op, txn, &data, &e );
e->e_id = id;
if ( !BER_BVISNULL( &dn )) {
e->e_name = dn;
goto done;
}
- LDAP_SLIST_INSERT_HEAD( &op.o_extra, &mdb_tool_axinfo[0]->ai_oe, oe_next );
+ if ( mdb_tool_threads > 1 ) {
+ LDAP_SLIST_INSERT_HEAD( &op.o_extra, &mdb_tool_axinfo[0]->ai_oe, oe_next );
+ }
rc = mdb_tool_index_add( &op, txn, e );
if( rc != 0 ) {
snprintf( text->bv_val, text->bv_len,
if (dkids > 1) {
rc = mdb_cursor_get(mc, &key, &data, MDB_NEXT_DUP);
down:
- ptr = data.mv_data + data.mv_size - sizeof(ID);
+ ptr = (unsigned char *)data.mv_data + data.mv_size - sizeof(ID);
memcpy(&id, ptr, sizeof(ID));
depth++;
memcpy(stack[depth].rdn, data.mv_data, data.mv_size);
goto leave;
}
data.mv_data = stack[depth].rdn;
- ptr = data.mv_data + data.mv_size;
+ ptr = (unsigned char *)data.mv_data + data.mv_size;
memcpy(ptr, &num[depth], sizeof(ID));
data.mv_size += sizeof(ID);
rc = mdb_cursor_del(mc, 0);