-IDList *
-index_read(
- Backend *be,
- char *type,
- int indextype,
- char *val
-)
-{
- struct dbcache *db;
- Datum key;
- IDList *idl;
- int indexmask, syntax;
- char prefix;
- char *realval, *tmpval;
- char buf[BUFSIZ];
-
-#ifdef HAVE_BERKELEY_DB2
- memset( &key, 0, sizeof( key ) );
-#endif
-
- prefix = index2prefix( indextype );
- Debug( LDAP_DEBUG_TRACE, "=> index_read( \"%s\" \"%c\" \"%s\" )\n",
- type, prefix, val );
-
- attr_masks( be->be_private, type, &indexmask, &syntax );
- if ( ! (indextype & indexmask) ) {
- idl = idl_allids( be );
- Debug( LDAP_DEBUG_TRACE,
- "<= index_read %lu candidates (allids - not indexed)\n",
- idl ? idl->b_nids : 0, 0, 0 );
- return( idl );
- }