]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/tools.c
Happy New Year
[openldap] / servers / slapd / back-bdb / tools.c
index 40d46461dddd02062b9191a944251b895380b7b3..beb0048cecfd5b148e2c5f5a434b8e49d3c4e91a 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2012 The OpenLDAP Foundation.
+ * Copyright 2000-2015 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -672,6 +672,8 @@ ID bdb_tool_entry_put(
                         text->bv_val, 0, 0 );
                return NOID;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_tool_entry_put) ": txn id: %x\n",
+               tid->id(tid), 0, 0 );
        }
 
        op.o_hdr = &ohdr;
@@ -830,6 +832,11 @@ int bdb_tool_entry_reindex(
                return -1;
        }
 
+       op.o_hdr = &ohdr;
+       op.o_bd = be;
+       op.o_tmpmemctx = NULL;
+       op.o_tmpmfuncs = &ch_mfuncs;
+
        if (! (slapMode & SLAP_TOOL_QUICK)) {
        rc = TXN_BEGIN( bi->bi_dbenv, NULL, &tid, bi->bi_db_opflags );
        if( rc != 0 ) {
@@ -839,6 +846,8 @@ int bdb_tool_entry_reindex(
                        db_strerror(rc), rc, 0 );
                goto done;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_tool_entry_reindex) ": txn id: %x\n",
+               tid->id(tid), 0, 0 );
        }
        
        /*
@@ -852,11 +861,6 @@ int bdb_tool_entry_reindex(
                "=> " LDAP_XSTRING(bdb_tool_entry_reindex) "( %ld, \"%s\" )\n",
                (long) id, e->e_dn, 0 );
 
-       op.o_hdr = &ohdr;
-       op.o_bd = be;
-       op.o_tmpmemctx = NULL;
-       op.o_tmpmfuncs = &ch_mfuncs;
-
        rc = bdb_tool_index_add( &op, tid, e );
 
 done:
@@ -929,6 +933,8 @@ ID bdb_tool_entry_modify(
                                 text->bv_val, 0, 0 );
                        return NOID;
                }
+               Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_tool_entry_modify) ": txn id: %x\n",
+                       tid->id(tid), 0, 0 );
        }
 
        op.o_hdr = &ohdr;