[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: commit: ldap/servers/slapd/back-bdb modify.c

> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Howard Chu

> This code is going to need some more changing, or perhaps
> reverting to the
> previous approach. As Kurt pointed out to me, we can't delete
> keys from the
> index based on a single value, because the index generation
> code tends to
> generate duplicate keys for a large set of input. E.g., a
> substring index on
> an attribute foo with values
> 	foo=efghi
>     foo=bcdef
> will have a duplicate key on the "ef" substring. With the
> current code, if
> you delete the attribute foo=efghi, then the key for "ef"
> will disappear,
> which will wrongly cause the value foo=bcdef to disappear
> from substring
> searches.

Clarifying the wording of the above example - there will be a key collision
for the "foo=*ef*" substring index. Deleting the value foo=efghi will delete
the key for "foo=*ef*" even though it's still needed for the "foo=bcdef"

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support