1 /* index.c - routines for dealing with attribute indexes */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2000-2013 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
21 #include <ac/string.h>
22 #include <ac/socket.h>
36 MDB_cursor **saved_cursor,
46 Debug( LDAP_DEBUG_TRACE, "=> key_read\n", 0, 0, 0 );
49 if (k->bv_len & ALIGNER) {
50 key.mv_size = sizeof(kbuf);
53 memcpy(kbuf, k->bv_val, k->bv_len);
57 key.mv_size = k->bv_len;
58 key.mv_data = k->bv_val;
61 rc = mdb_idl_fetch_key( be, txn, dbi, &key, ids, saved_cursor, get_flag );
63 if( rc != LDAP_SUCCESS ) {
64 Debug( LDAP_DEBUG_TRACE, "<= mdb_index_read: failed (%d)\n",
67 Debug( LDAP_DEBUG_TRACE, "<= mdb_index_read %ld candidates\n",
68 (long) MDB_IDL_N(ids), 0, 0 );