]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/index.c
Sync with HEAD as of 14-March-2004
[openldap] / servers / slapd / back-bdb / index.c
index c4196495cbf6237fe231d8be60e2239d8f79a801..f2d807eb52a8df8b56e48dea3bd585c28b5d4feb 100644 (file)
@@ -1,8 +1,17 @@
 /* index.c - routines for dealing with attribute indexes */
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 2000-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
 
 #include "portable.h"
@@ -97,7 +106,7 @@ int bdb_index_param(
                return LDAP_INAPPROPRIATE_MATCHING;
        }
 
-       rc = bdb_db_cache( be, NULL, prefixp->bv_val, &db );
+       rc = bdb_db_cache( be, prefixp->bv_val, &db );
 
        if( rc != LDAP_SUCCESS ) {
                return rc;
@@ -155,11 +164,10 @@ static int indexer(
        const char *text;
        DB *db;
        struct berval *keys;
-       void *mark;
 
        assert( mask );
 
-       rc = bdb_db_cache( op->o_bd, txn, atname->bv_val, &db );
+       rc = bdb_db_cache( op->o_bd, atname->bv_val, &db );
        
        if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
@@ -174,10 +182,6 @@ static int indexer(
                return LDAP_OTHER;
        }
 
-#if 0  /* No longer needed, our frees are in order so nothing accumulates */
-       mark = sl_mark(op->o_tmpmemctx);
-#endif
-
        if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) {
                rc = bdb_key_change( op->o_bd, db, txn, &presence_key, id, opid );
                if( rc ) {
@@ -251,9 +255,6 @@ static int indexer(
        }
 
 done:
-#if 0
-       sl_release( mark, op->o_tmpmemctx );
-#endif
        return rc;
 }