mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Resync with updated libmdb api
This commit is contained in:
parent
8ca32bcb91
commit
cb24acddf0
6 changed files with 15 additions and 14 deletions
|
|
@ -235,7 +235,7 @@ mdb_dn2id_delete(
|
|||
data.mv_data = d;
|
||||
|
||||
/* Delete our ID from the parent's list */
|
||||
rc = mdb_del( txn, dbi, &key, &data, MDB_DEL_DUP );
|
||||
rc = mdb_del( txn, dbi, &key, &data );
|
||||
|
||||
/* Delete our ID from the tree. With sorted duplicates, this
|
||||
* will leave any child nodes still hanging around. This is OK
|
||||
|
|
@ -244,7 +244,7 @@ mdb_dn2id_delete(
|
|||
if ( rc == 0 ) {
|
||||
nid = e->e_id;
|
||||
d->nrdnlen[0] ^= 0x80;
|
||||
rc = mdb_del( txn, dbi, &key, &data, MDB_DEL_DUP );
|
||||
rc = mdb_del( txn, dbi, &key, &data );
|
||||
}
|
||||
|
||||
op->o_tmpfree( d, op->o_tmpmemctx );
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ int mdb_id2entry_delete(
|
|||
key.mv_size = sizeof(ID);
|
||||
|
||||
/* delete from database */
|
||||
rc = mdb_del( tid, dbi, &key, NULL, 0 );
|
||||
rc = mdb_del( tid, dbi, &key, NULL );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -382,7 +382,7 @@ mdb_opinfo_get( Operation *op, struct mdb_info *mdb, int rdonly, mdb_op_info **m
|
|||
if ( !moi->moi_txn ) {
|
||||
if ( !ctx ) {
|
||||
/* Shouldn't happen unless we're single-threaded */
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, 1, &moi->moi_txn );
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, MDB_RDONLY, &moi->moi_txn );
|
||||
if (rc) {
|
||||
Debug( LDAP_DEBUG_ANY, "mdb_opinfo_get: err %s(%d)\n",
|
||||
mdb_strerror(rc), rc, 0 );
|
||||
|
|
@ -390,7 +390,7 @@ mdb_opinfo_get( Operation *op, struct mdb_info *mdb, int rdonly, mdb_op_info **m
|
|||
return rc;
|
||||
}
|
||||
if ( ldap_pvt_thread_pool_getkey( ctx, mdb->mi_dbenv, &data, NULL ) ) {
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, 1, &moi->moi_txn );
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, MDB_RDONLY, &moi->moi_txn );
|
||||
if (rc) {
|
||||
Debug( LDAP_DEBUG_ANY, "mdb_opinfo_get: err %s(%d)\n",
|
||||
mdb_strerror(rc), rc, 0 );
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ mdb_idl_insert_key(
|
|||
hi = id;
|
||||
}
|
||||
/* delete the old key */
|
||||
rc = mdb_del( txn, dbi, key, NULL, 0 );
|
||||
rc = mdb_del( txn, dbi, key, NULL );
|
||||
if ( rc != 0 ) {
|
||||
err = "mdb_del";
|
||||
goto fail;
|
||||
|
|
@ -510,7 +510,7 @@ mdb_idl_insert_key(
|
|||
data.mv_data = &hi;
|
||||
data.mv_size = sizeof(ID);
|
||||
/* Delete the current lo/hi */
|
||||
rc = mdb_del( txn, dbi, key, &data, MDB_DEL_DUP );
|
||||
rc = mdb_del( txn, dbi, key, &data );
|
||||
if ( rc != 0 ) {
|
||||
err = "mdb_del lo/hi";
|
||||
goto fail;
|
||||
|
|
@ -576,7 +576,7 @@ mdb_idl_delete_key(
|
|||
if ( tmp != 0 ) {
|
||||
/* Not a range, just delete it */
|
||||
data.mv_data = &id;
|
||||
rc = mdb_del( txn, dbi, key, &data, MDB_DEL_DUP );
|
||||
rc = mdb_del( txn, dbi, key, &data );
|
||||
if ( rc != 0 ) {
|
||||
err = "mdb_del id";
|
||||
goto fail;
|
||||
|
|
@ -596,7 +596,7 @@ mdb_idl_delete_key(
|
|||
}
|
||||
if ( lo2 >= hi2 ) {
|
||||
/* The range has collapsed... */
|
||||
rc = mdb_del( txn, dbi, key, NULL, 0 );
|
||||
rc = mdb_del( txn, dbi, key, NULL );
|
||||
if ( rc != 0 ) {
|
||||
err = "mdb_del";
|
||||
goto fail;
|
||||
|
|
@ -607,7 +607,7 @@ mdb_idl_delete_key(
|
|||
data.mv_data = &lo;
|
||||
else
|
||||
data.mv_data = &hi;
|
||||
rc = mdb_del( txn, dbi, key, &data, MDB_DEL_DUP );
|
||||
rc = mdb_del( txn, dbi, key, &data );
|
||||
if ( rc != 0 ) {
|
||||
err = "c_del";
|
||||
goto fail;
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ mdb_db_close( BackendDB *be, ConfigReply *cr )
|
|||
if ( mdb->mi_dbenv ) {
|
||||
if ( mdb->mi_dbis[0] ) {
|
||||
int i;
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, 1, &txn );
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, MDB_RDONLY, &txn );
|
||||
|
||||
mdb_attr_dbs_close( mdb, txn );
|
||||
for ( i=0; i<MDB_NDB; i++ )
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 3e694d4d5b93b7b812548d20df83eaa3d5be26a1
|
||||
Subproject commit b6c026a8c019a19833107c8ee1e60c14d7541f9f
|
||||
|
|
@ -187,7 +187,7 @@ ID mdb_tool_entry_next(
|
|||
assert( mdb != NULL );
|
||||
|
||||
if ( !txn ) {
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, 1, &txn );
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, MDB_RDONLY, &txn );
|
||||
if ( rc )
|
||||
return NOID;
|
||||
rc = mdb_cursor_open( txn, mdb->mi_id2entry, &cursor );
|
||||
|
|
@ -256,7 +256,8 @@ ID mdb_tool_dn2id_get(
|
|||
mdb = (struct mdb_info *) be->be_private;
|
||||
|
||||
if ( !txn ) {
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, (slapMode & SLAP_TOOL_READONLY) != 0, &txn );
|
||||
rc = mdb_txn_begin( mdb->mi_dbenv, (slapMode & SLAP_TOOL_READONLY) != 0 ?
|
||||
MDB_RDONLY : 0, &txn );
|
||||
if ( rc )
|
||||
return NOID;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue