]> git.sur5r.net Git - openldap/commitdiff
Don't maintain a DN_SUBTREE index for the backend suffix, just return
authorHoward Chu <hyc@openldap.org>
Mon, 3 Dec 2001 14:04:06 +0000 (14:04 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 3 Dec 2001 14:04:06 +0000 (14:04 +0000)
BDB_IDL_ALL. This has a huge impact on I/O and txn logs.

servers/slapd/back-bdb/dn2id.c

index 0e73b9573872c2a481741953113a9723df03680f..d9a89325bec7133307b6a48f460acfb34b255fcf 100644 (file)
@@ -70,7 +70,7 @@ bdb_dn2id_add(
        }
 
        {
-               char **subtree = dn_subtree( NULL, dn );
+               char **subtree = dn_subtree( be, dn );
 
                if( subtree != NULL ) {
                        int i;
@@ -152,7 +152,7 @@ bdb_dn2id_delete(
        }
 
        {
-               char **subtree = dn_subtree( NULL, dn );
+               char **subtree = dn_subtree( be, dn );
 
                if( subtree != NULL ) {
                        int i;
@@ -363,6 +363,12 @@ bdb_dn2idl(
 
        Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2idl( \"%s\" )\n", dn, 0, 0 );
 
+       if (prefix == DN_SUBTREE_PREFIX && be_issuffix(be, dn))
+       {
+               BDB_IDL_ALL(bdb, ids);
+               return 0;
+       }
+
        DBTzero( &key );
        key.size = strlen( dn ) + 2;
        key.data = ch_malloc( key.size );