Commit 1082a5a9 authored by Juan Gomez's avatar Juan Gomez
Browse files

Finishes growing index file fix. Ready for 1.2.4?

parent 573e279d
......@@ -2,6 +2,7 @@ OpenLDAP Change Log
Changes included in OpenLDAP 1.2 Release Engineering
CVS Tag: OPENLDAP_REL_ENG_1_2
Fixed the growing index file problem.
Added the MDBM to the ldbm backends (memory mapped dbm)
Fixed slapd to reap back-shell children processes
Updated README to require BerkeleyDB 2.7.5
......
......@@ -88,9 +88,6 @@ index_add_mods(
id,
__INDEX_ADD_OP);
break;
case LDAP_MOD_SOFTADD: /* SOFTADD means index was there already */
rc = 0;
break;
case LDAP_MOD_DELETE:
rc = index_change_values( be,
mods->mod_type,
......@@ -98,6 +95,9 @@ index_add_mods(
id,
__INDEX_DEL_OP );
break;
case LDAP_MOD_SOFTADD: /* SOFTADD means index was there */
rc = 0;
break;
}
if ( rc != 0 ) {
......
......@@ -107,6 +107,7 @@ int ldbm_internal_modify(
{
int i, err;
LDAPMod *mod;
Attribute *a;
if ( ((be->be_lastmod == ON)
|| ((be->be_lastmod == UNDEFINED)&&(global_lastmod == ON)))
......@@ -135,6 +136,19 @@ int ldbm_internal_modify(
break;
case LDAP_MOD_REPLACE:
/* Need to remove all values from indexes before they
* are lost.
*/
if( e->e_attrs
&& ((a = attr_find( e->e_attrs, mod->mod_type ))
!= NULL) ) {
(void) index_change_values( be,
mod->mod_type,
a->a_vals,
e->e_id,
__INDEX_DEL_OP);
}
err = replace_values( e, mod, op->o_ndn );
break;
case LDAP_MOD_SOFTADD:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment