From: Howard Chu Date: Tue, 4 Dec 2001 00:10:47 +0000 (+0000) Subject: Don't maintain a DN_SUBTREE index for the backend suffix. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~795 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bf4bbcaae207318e66ce8f095aa650499132a1f1;p=openldap Don't maintain a DN_SUBTREE index for the backend suffix. --- diff --git a/servers/slapd/back-ldbm/dn2id.c b/servers/slapd/back-ldbm/dn2id.c index 1375ac5b5e..f743046aa5 100644 --- a/servers/slapd/back-ldbm/dn2id.c +++ b/servers/slapd/back-ldbm/dn2id.c @@ -80,7 +80,7 @@ dn2id_add( } if ( rc != -1 ) { - char **subtree = dn_subtree( NULL, dn ); + char **subtree = dn_subtree( be, dn ); if( subtree != NULL ) { int i; @@ -225,6 +225,12 @@ dn2idl( assert( idlp != NULL ); *idlp = NULL; + if ( prefix == DN_SUBTREE_PREFIX && be_issuffix(be, dn) ) { + *idlp = ch_malloc( sizeof(ID) ); + **idlp = ID_BLOCK_ALLIDS_VALUE; + return 0; + } + if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX, LDBM_WRCREAT )) == NULL ) { #ifdef NEW_LOGGING @@ -309,7 +315,7 @@ dn2id_delete( } { - char **subtree = dn_subtree( NULL, dn ); + char **subtree = dn_subtree( be, dn ); if( subtree != NULL ) { int i;