Issue 5521 - Can't change indexing of an attribute within a single modification
Summary: Can't change indexing of an attribute within a single modification
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-21 14:27 UTC by Ralf
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ralf 2008-05-21 14:27:22 UTC
Full_Name: Ralf Haferkamp
Version: HEAD, RE24
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (85.8.89.54)


The following modification to add an additional index an attribute fails with
the error messages pasted below:

--------------------------
dn: olcDatabase={1}bdb,cn=config
changetype: modify
delete: olcdbindex
olcDbIndex: cn pres,eq
-
add: olcdbindex
olcDbIndex: cn pres,eq,sub
--------------------------

modifying entry "olcDatabase={1}bdb,cn=config"
ldap_modify: Other (e.g., implementation specific) error (80)
        additional info: <olcDbIndex> handler exited with 1

As far as I can see it fails because the old indexmask hat not yet been deleted
from the bdb-struct. The ainfo_insert()-call in
back-bdb/attr.c(bdb_attr_index_config()) returns with -1.

Splitting the above modification in two separate operations works around that
problem.

Comment 1 ando@openldap.org 2008-05-25 16:28:49 UTC
rhafer@suse.de wrote:

> The following modification to add an additional index an attribute fails with
> the error messages pasted below:
> 
> --------------------------
> dn: olcDatabase={1}bdb,cn=config
> changetype: modify
> delete: olcdbindex
> olcDbIndex: cn pres,eq
> -
> add: olcdbindex
> olcDbIndex: cn pres,eq,sub
> --------------------------
> 
> modifying entry "olcDatabase={1}bdb,cn=config"
> ldap_modify: Other (e.g., implementation specific) error (80)
>         additional info: <olcDbIndex> handler exited with 1
> 
> As far as I can see it fails because the old indexmask hat not yet been deleted
> from the bdb-struct. The ainfo_insert()-call in
> back-bdb/attr.c(bdb_attr_index_config()) returns with -1.
> 
> Splitting the above modification in two separate operations works around that
> problem.

What about using replace instead?

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 2 Ralf 2008-05-26 12:16:57 UTC
On Sonntag, 25. Mai 2008, Pierangelo Masarati wrote:
> rhafer@suse.de wrote:
> > The following modification to add an additional index an attribute
> > fails with the error messages pasted below:
> >
> > --------------------------
> > dn: olcDatabase={1}bdb,cn=config
> > changetype: modify
> > delete: olcdbindex
> > olcDbIndex: cn pres,eq
> > -
> > add: olcdbindex
> > olcDbIndex: cn pres,eq,sub
> > --------------------------
> >
> > modifying entry "olcDatabase={1}bdb,cn=config"
> > ldap_modify: Other (e.g., implementation specific) error (80)
> >         additional info: <olcDbIndex> handler exited with 1
> >
> > As far as I can see it fails because the old indexmask hat not yet
> > been deleted from the bdb-struct. The ainfo_insert()-call in
> > back-bdb/attr.c(bdb_attr_index_config()) returns with -1.
> >
> > Splitting the above modification in two separate operations works
> > around that problem.
>
> What about using replace instead?
That causes the same behavior as the modification pasted above. So it 
doesn't work as well.

-- 
Ralf

Comment 3 ando@openldap.org 2008-05-26 14:19:02 UTC
rhafer@suse.de wrote:

>>> Splitting the above modification in two separate operations works
>>> around that problem.
>> What about using replace instead?
> That causes the same behavior as the modification pasted above. So it 
> doesn't work as well.

Also, it might not be very practical if very complex indexing is in 
place...

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 4 Ralf 2008-05-26 15:26:54 UTC
moved from Incoming to Software Bugs
Comment 5 Ralf 2008-05-26 15:40:03 UTC
On Montag, 26. Mai 2008, ando@sys-net.it wrote:
> rhafer@suse.de wrote:
> >>> Splitting the above modification in two separate operations works
> >>> around that problem.
> >>
> >> What about using replace instead?
> >
> > That causes the same behavior as the modification pasted above. So
> > it doesn't work as well.
>
> Also, it might not be very practical if very complex indexing is in
> place...
Yes. But I think I fixed the original issue now. (r1.39 of 
servers/slapd/back-bdb/attr.c)

-- 
Ralf

Comment 6 Ralf 2008-05-26 15:40:30 UTC
changed notes
changed state Open to Test
Comment 7 Howard Chu 2008-06-10 20:07:54 UTC
changed notes
changed state Test to Closed
Comment 8 OpenLDAP project 2014-08-01 21:04:15 UTC
Fixed in HEAD/RE24