From: Howard Chu Date: Sat, 19 Jan 2002 04:51:42 +0000 (+0000) Subject: Reset Entry->e_ocflags to 0 if objectClass attr is modified. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~62 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a8658a8163099bbe315bfc1ca718aecc2f77efa4;p=openldap Reset Entry->e_ocflags to 0 if objectClass attr is modified. (Only an issue with entry caching...) --- diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index 17acfbd736..5050bddda8 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -117,6 +117,11 @@ int bdb_modify_internal( return err; } + /* If objectClass was modified, reset the flags */ + if ( mod->sm_desc == slap_schema.si_ad_objectClass ) { + e->e_ocflags = 0; + } + /* check if modified attribute was indexed */ err = bdb_index_is_indexed( be, mod->sm_desc ); if ( err == LDAP_SUCCESS ) { diff --git a/servers/slapd/back-ldbm/modify.c b/servers/slapd/back-ldbm/modify.c index 685d87c6f5..8753991485 100644 --- a/servers/slapd/back-ldbm/modify.c +++ b/servers/slapd/back-ldbm/modify.c @@ -187,6 +187,11 @@ int ldbm_modify_internal( goto exit; } + /* If objectClass was modified, reset the flags */ + if ( mod->sm_desc == slap_schema.si_ad_objectClass ) { + e->e_ocflags = 0; + } + /* check if modified attribute was indexed */ rc = index_is_indexed( be, mod->sm_desc ); if ( rc == LDAP_SUCCESS ) {