/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2011-2015 The OpenLDAP Foundation.
+ * Copyright 2011-2016 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
mdb_cursor_close( cursor );
cursor = NULL;
}
+ {
+ struct mdb_info *mdb = be->be_private;
+ if ( mdb ) {
+ int i;
+ for (i=0; i<mdb->mi_nattrs; i++)
+ mdb->mi_attrs[i]->ai_cursor = NULL;
+ }
+ }
if( mdb_tool_txn ) {
int rc;
if (( rc = mdb_txn_commit( mdb_tool_txn ))) {
}
}
}
- rc = mdb_entry_decode( &op, mdb_tool_txn, &data, &e );
+ rc = mdb_entry_decode( &op, mdb_tool_txn, &data, id, &e );
e->e_id = id;
if ( !BER_BVISNULL( &dn )) {
e->e_name = dn;
mdb_tool_txn = NULL;
idcursor = NULL;
if( rc != 0 ) {
+ mdb->mi_numads = 0;
snprintf( text->bv_val, text->bv_len,
"txn_commit failed: %s (%d)",
mdb_strerror(rc), rc );
if( rc == 0 ) {
rc = mdb_txn_commit( mdb_tool_txn );
if( rc != 0 ) {
+ mdb->mi_numads = 0;
snprintf( text->bv_val, text->bv_len,
"txn_commit failed: %s (%d)",
mdb_strerror(rc), rc );