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:
Howard Chu 2003-12-24 13:27:03 +00:00
parent 93390425df
commit e6f34fddcd
3 changed files with 57 additions and 80 deletions

View file

@ -464,16 +464,6 @@ retry: /* transaction retry */
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 {
struct berval nrdn;
Entry *e = entry_dup( op->ora_e );
@ -512,7 +502,6 @@ retry: /* transaction retry */
rs->sr_err = LDAP_SUCCESS;
}
}
}
ltid = NULL;
op->o_private = NULL;

View file

@ -617,8 +617,6 @@ retry: /* transaction retry */
rs->sr_err = LDAP_SUCCESS;
}
} else {
EntryInfo *ctx_ei;
bdb_cache_modify( e, dummy.e_attrs, bdb->bi_dbenv, locker, &lock );
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {

View file

@ -979,15 +979,6 @@ retry: /* transaction retry */
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 {
bdb_cache_modrdn( save, &op->orr_nnewrdn, e, neip,
bdb->bi_dbenv, locker, &lock );
@ -1023,7 +1014,6 @@ retry: /* transaction retry */
rs->sr_err = LDAP_SUCCESS;
}
}
}
ltid = NULL;
op->o_private = NULL;