From: Pierangelo Masarati Date: Sat, 8 Jan 2005 11:33:51 +0000 (+0000) Subject: enable if one suffix only is present X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~448 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e5c58636dec41992d27b02ff06b8de77eb76e07f;p=openldap enable if one suffix only is present --- diff --git a/servers/slapd/back-sql/init.c b/servers/slapd/back-sql/init.c index 11c4518970..48eb0f2f72 100644 --- a/servers/slapd/back-sql/init.c +++ b/servers/slapd/back-sql/init.c @@ -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 );