from Jong Hyuk Choi <jongchoi@us.ibm.com> (ITS#1585 for ITS1575).
#include "back-bdb.h"
#include "external.h"
-static char bdb_gid[DB_XIDDATASIZE];
-
int
bdb_add(
BackendDB *be,
}
} else {
- if (( rc=TXN_PREPARE( ltid, bdb_gid )) != 0 ) {
+ char gid[DB_XIDDATASIZE];
+
+ snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx",
+ bdb_uuid, (long) op->o_connid, (long) op->o_opid );
+
+ if (( rc=TXN_PREPARE( ltid, gid )) != 0 ) {
text = "txn_prepare failed";
} else {
{ NULL, NULL, 0, 0 }
};
+struct berval bdb_uuid = { 0, NULL };
+
static int
bdb_open( BackendInfo *bi )
{
NULL
};
+ bi->bi_controls = controls;
+
/* initialize the underlying database system */
Debug( LDAP_DEBUG_TRACE, "bdb_open: initialize BDB backend\n",
0, 0, 0 );
db_env_set_func_yield( ldap_pvt_thread_yield );
- bi->bi_controls = controls;
+ {
+ static char uuidbuf[40];
+
+ bdb_uuid.bv_len = lutil_uuidstr( uuidbuf, sizeof( uuidbuf ));
+ bdb_uuid.bv_val = uuidbuf;
+ }
+
return 0;
}
#include "back-bdb.h"
#include "external.h"
-static char bdb_gid[DB_XIDDATASIZE];
-
int
bdb_modrdn(
Backend *be,
}
} else {
- if(( rc=TXN_PREPARE( ltid, bdb_gid )) != 0 ) {
+ char gid[DB_XIDDATASIZE];
+
+ snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx",
+ bdb_uuid, (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 ) {
#define bdb_index_entry_del(be,t,e,ap) \
bdb_index_entry((be),(t),SLAP_INDEX_DELETE_OP,(e),(ap))
+/*
+ * init.c
+ */
+extern struct berval bdb_uuid;
+
/*
* key.c
*/