mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
ITS#2895 TXN_PREPARE is not needed since we use nested transactions. It
also has a side-effect of releasing all the transaction's existing locks.
This commit is contained in:
parent
93390425df
commit
e6f34fddcd
3 changed files with 57 additions and 80 deletions
|
|
@ -464,16 +464,6 @@ retry: /* transaction retry */
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
char gid[DB_XIDDATASIZE];
|
|
||||||
|
|
||||||
memset( gid, 0, sizeof(gid) );
|
|
||||||
snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx",
|
|
||||||
bdb_uuid.bv_val, (long) op->o_connid, (long) op->o_opid );
|
|
||||||
|
|
||||||
if (( rs->sr_err=TXN_PREPARE( ltid, gid )) != 0 ) {
|
|
||||||
rs->sr_text = "txn_prepare failed";
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
struct berval nrdn;
|
struct berval nrdn;
|
||||||
Entry *e = entry_dup( op->ora_e );
|
Entry *e = entry_dup( op->ora_e );
|
||||||
|
|
@ -512,7 +502,6 @@ retry: /* transaction retry */
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ltid = NULL;
|
ltid = NULL;
|
||||||
op->o_private = NULL;
|
op->o_private = NULL;
|
||||||
|
|
|
||||||
|
|
@ -617,8 +617,6 @@ retry: /* transaction retry */
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
EntryInfo *ctx_ei;
|
|
||||||
|
|
||||||
bdb_cache_modify( e, dummy.e_attrs, bdb->bi_dbenv, locker, &lock );
|
bdb_cache_modify( e, dummy.e_attrs, bdb->bi_dbenv, locker, &lock );
|
||||||
|
|
||||||
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
||||||
|
|
|
||||||
|
|
@ -979,15 +979,6 @@ retry: /* transaction retry */
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
char gid[DB_XIDDATASIZE];
|
|
||||||
|
|
||||||
memset( gid, 0, sizeof(gid) );
|
|
||||||
snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx",
|
|
||||||
bdb_uuid.bv_val, (long) op->o_connid, (long) op->o_opid );
|
|
||||||
|
|
||||||
if(( rs->sr_err=TXN_PREPARE( ltid, gid )) != 0 ) {
|
|
||||||
rs->sr_text = "txn_prepare failed";
|
|
||||||
} else {
|
} else {
|
||||||
bdb_cache_modrdn( save, &op->orr_nnewrdn, e, neip,
|
bdb_cache_modrdn( save, &op->orr_nnewrdn, e, neip,
|
||||||
bdb->bi_dbenv, locker, &lock );
|
bdb->bi_dbenv, locker, &lock );
|
||||||
|
|
@ -1023,7 +1014,6 @@ retry: /* transaction retry */
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ltid = NULL;
|
ltid = NULL;
|
||||||
op->o_private = NULL;
|
op->o_private = NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue