ソースを参照

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

Rich Megginson 18 年 前
コミット
50cff32950

+ 0 - 37
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

+ 4 - 0
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.