]> git.sur5r.net Git - openldap/commitdiff
enable if one suffix only is present
authorPierangelo Masarati <ando@openldap.org>
Sat, 8 Jan 2005 11:33:51 +0000 (11:33 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 8 Jan 2005 11:33:51 +0000 (11:33 +0000)
servers/slapd/back-sql/init.c

index 11c45189707a3ecae8e6008438170e98553d6ca5..48eb0f2f72c976dac5f56ab41186f32c9c451bf7 100644 (file)
@@ -449,6 +449,14 @@ backsql_db_open(
                        0, 0, 0 );
                return 1;
        }
+
+       /* should never happen! */
+       assert( bd->be_nsuffix != NULL );
+       
+       if ( BER_BVISNULL( &bd->be_nsuffix[ 1 ] ) ) {
+               /* enable if only one suffix is defined */
+               bi->sql_flags |= BSQLF_USE_SUBTREE_SHORTCUT;
+       }
        
        Debug( LDAP_DEBUG_TRACE, "<==backsql_db_open(): "
                "test succeeded, schema map loaded\n", 0, 0, 0 );