+ if( op->o_noop ) {
+ if(( rc=TXN_ABORT( ltid )) != 0 ) {
+ text = "txn_abort (no-op) failed";
+ } else {
+ rc = LDAP_SUCCESS;
+ }
+
+ } else {
+ char gid[DB_XIDDATASIZE];
+
+ snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx",
+ bdb_uuid.bv_val, (long) op->o_connid, (long) op->o_opid );
+
+ if(( rc=TXN_PREPARE( ltid, gid )) != 0 ) {
+ text = "txn_prepare failed";
+ } else {
+ if( bdb_cache_update_entry(&bdb->bi_cache, e) == -1 ) {
+ if(( rc=TXN_ABORT( ltid )) != 0 ) {
+ text ="cache update & txn_abort failed";
+ } else {
+ rc = LDAP_OTHER;
+ text = "cache update failed";
+ }
+
+ } else {
+ if(( rc=TXN_COMMIT( ltid, 0 )) != 0 ) {
+ text = "txn_commit failed";
+ } else {
+ rc = LDAP_SUCCESS;
+ }
+ }
+ }