summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-07-25 15:20:01 +0000
committerRich Megginson <rmeggins@redhat.com>2007-07-25 15:20:01 +0000
commit50cff32950e3a21c794e136a6ae8323a08e7e352 (patch)
tree67d2e36b917ddb1c4b75ae3a70687ccd5733008a
parent28744c2c93ff384e10203d52a0226d4fcc4dab73 (diff)
downloadds-50cff32950e3a21c794e136a6ae8323a08e7e352.tar.gz
ds-50cff32950e3a21c794e136a6ae8323a08e7e352.tar.xz
ds-50cff32950e3a21c794e136a6ae8323a08e7e352.zip
Resolves: bug 249470
Bug Description: cn equality index missing by default Reviewed by: nhosoi (Thanks!) Fix Description: When creating the database instance during dse.ldif processing, we do not create the user defined indexes from the defaults for this backend. This used to work in the old setup code because that code would always add the configuration for the indexes for the new instance. The way it is supposed to work is that a new instance should just copy the default indexes for that backend. This works fine when adding an instance via LDAP but not during startup. I just added a call to have this done during startup. I also removed some obsolete indexes from the default indexes. Platforms tested: RHEL4 Flag Day: no Doc impact: no
-rw-r--r--ldap/ldif/template-dse.ldif.in37
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_instance_config.c4
2 files changed, 4 insertions, 37 deletions
diff --git a/ldap/ldif/template-dse.ldif.in b/ldap/ldif/template-dse.ldif.in
index 5d9aec85..ba064d8e 100644
--- a/ldap/ldif/template-dse.ldif.in
+++ b/ldap/ldif/template-dse.ldif.in
@@ -603,22 +603,6 @@ cn: member
nssystemindex: false
nsindextype: eq
-dn: cn=nsCalXItemId,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config
-objectclass: top
-objectclass: nsIndex
-cn: nsCalXItemId
-nssystemindex: false
-nsindextype: pres
-nsindextype: eq
-nsindextype: sub
-
-dn: cn=nsLIProfileName,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config
-objectclass: top
-objectclass: nsIndex
-cn: nsLIProfileName
-nssystemindex: false
-nsindextype: eq
-
dn: cn=nsUniqueId,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config
objectclass: top
objectclass: nsIndex
@@ -626,13 +610,6 @@ cn: nsUniqueId
nssystemindex: true
nsindextype: eq
-dn: cn=nswcalCALID,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config
-objectclass: top
-objectclass: nsIndex
-cn: nswcalCALID
-nssystemindex: false
-nsindextype: eq
-
dn: cn=numsubordinates,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config
objectclass: top
objectclass: nsIndex
@@ -661,20 +638,6 @@ cn: parentid
nssystemindex: true
nsindextype: eq
-dn: cn=pipstatus,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config
-objectclass: top
-objectclass: nsIndex
-cn: pipstatus
-nssystemindex: false
-nsindextype: eq
-
-dn: cn=pipuid,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config
-objectclass: top
-objectclass: nsIndex
-cn: pipuid
-nssystemindex: false
-nsindextype: pres
-
dn: cn=seeAlso,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config
objectclass: top
objectclass: nsIndex
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
index 7dfc826f..94f1f80e 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
@@ -837,6 +837,10 @@ ldbm_instance_add_instance_entry_callback(Slapi_PBlock *pb, Slapi_Entry* entryBe
if (pb == NULL) {
/* called during startup -- do the rest now */
rc = ldbm_instance_generate(li, instance_name, NULL);
+ if (!rc) {
+ inst = ldbm_instance_find_by_name(li, instance_name);
+ rc = ldbm_instance_create_default_user_indexes(inst);
+ }
}
/* if called during a normal ADD operation, the postadd callback
* will do the rest.