Skip to content
Snippets Groups Projects
Commit 01f698bc authored by Ondrej Kuznik's avatar Ondrej Kuznik Committed by Howard Chu
Browse files

ITS#7256 A few issues discovered during testing slapmodify.

- bdb deallocates cursor after some tool operations but expects it to be
  around every time it is called
- mdb tries to allocate a second transaction while it already holds one,
  deadlocking
- op->o_hdr must exist for most uses of op, but o_tmpmfuncs need not
- what about indexing after a tool modify? Does it happen automatically?
parent d3a5ab82
Branches
Tags
No related merge requests found
......@@ -747,6 +747,15 @@ done:
e->e_id = NOID;
}
if ( cursor == NULL )
{
int rc = bdb->bi_id2entry->bdi_db->cursor(
bdb->bi_id2entry->bdi_db, bdb->bi_cache.c_txn, &cursor,
bdb->bi_db_opflags );
if ( rc != 0 )
e->e_id = NOID;
}
return e->e_id;
}
......@@ -982,6 +991,15 @@ done:
e->e_id = NOID;
}
if ( cursor == NULL )
{
int rc = bdb->bi_id2entry->bdi_db->cursor(
bdb->bi_id2entry->bdi_db, bdb->bi_cache.c_txn, &cursor,
bdb->bi_db_opflags );
if ( rc != 0 )
e->e_id = NOID;
}
return e->e_id;
}
......
......@@ -245,7 +245,7 @@ int mdb_entry_return(
if ( !e )
return 0;
if ( e->e_private ) {
if ( op->o_hdr ) {
if ( op->o_hdr && op->o_tmpmfuncs ) {
op->o_tmpfree( e->e_nname.bv_val, op->o_tmpmemctx );
op->o_tmpfree( e->e_name.bv_val, op->o_tmpmemctx );
op->o_tmpfree( e, op->o_tmpmemctx );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment