Issue 485 - multivalued attribute bug / indexing bug
Summary: multivalued attribute bug / indexing bug
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: 2000-03-18 01:23 UTC by Benjamin de los Angeles Jr.
Modified: 2014-08-01 21:06 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 Benjamin de los Angeles Jr. 2000-03-18 01:23:35 UTC
Full_Name: Benjamin de los Angeles Jr.
Version: 1.2.9
OS: Linux 2.2.14
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (203.176.35.2)


There is a problem locating entries where a value in a multivalued attribute is
deleted.  The search filter should use the multivalued attribute using '*' on
the leftmost side, i.e. mailalternateaddress=*somedomain.com.
Kurt D. Zeilenga <Kurt@OpenLDAP.org> says that this is an indexing bug in
1.2.9.
I guess this would only be noticed if you have multivalued attribute.

Here are outputs from openLDAP command line tools to reproduce the problem:

* Start by displaying current data

[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
"mailalternateaddress=*somedomain.com.ph" 
-D "cn=test, dc=surfshop.net, dc=ph" -W
Enter LDAP Password:

cn=bench, dc=surfshop.net, dc=ph
cn=Benjamin de los Angeles Jr.
sn=de los Angeles
objectclass=person
objectclass=organizationalPerson
.
.
.
mailalternateaddress=zwark@somedomain.com.ph
mailalternateaddress=lazone@somedomain.com.ph

* Delete a value from a multivalued attribute using modify

MODIFY Data in a file:

dn: cn=bench, dc=surfshop.net, dc=ph
changetype: modify
delete: mailalternateaddress
mailalternateaddress: lazone@somedomain.com.ph

[bench@ldap tools]$ ./ldapmodify -v -D "cn=test, dc=surfshop.net, dc=ph"
                      -W -f tempdata/modify-delete
Enter LDAP Password:
delete mailalternateaddress:
       lazone@somedomain.com.ph
modifying entry cn=bench, dc=surfshop.net, dc=ph 
modify complete

* Display the matching entry again

[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
                    "mailalternateaddress=*somedomain.com.ph" 
                    -D "cn=test, dc=surfshop.net, dc=ph" -W  

Enter LDAP Password:

(No output! This is the PROBLEM)

* Add again an entry

DATA in a file:

dn: cn=bench, dc=surfshop.net, dc=ph
changetype: modify
add: mailalternateaddress
mailalternateaddress: lazone@somedomain.com.ph
 
[bench@ldap tools]$ ./ldapmodify -v -D "cn=test, dc=surfshop.net, dc=ph"
                    -W -f tempdata/modify-add
Enter LDAP Password:
add mailalternateaddress:
        lazone@somedomain.com.ph
modifying entry cn=bench, dc=surfshop.net, dc=ph
modify complete

* Display the matching entry again

[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
                    "mailalternateaddress=*somedomain.com.ph" 
                    -D "cn=test, dc=surfshop.net, dc=ph" -W
Enter LDAP Password:

cn=bench, dc=surfshop.net, dc=ph
cn=Benjamin de los Angeles Jr.
sn=de los Angeles
objectclass=person
objectclass=organizationalPerson
.
.
.
mailalternateaddress=zwark@somedomain.com.ph
mailalternateaddress=lazone@somedomain.com.ph

( Magic! There goes the entry again! =) )


Comment 1 Kurt Zeilenga 2000-03-18 21:12:07 UTC
OPENLDAP_REL_ENG_1_2 (available via CVS) includes a fix designed
to resolve this issue.  Please test.

	Kurt

At 01:23 AM 3/18/00 GMT, bench@surfshop.net.ph wrote:
>Full_Name: Benjamin de los Angeles Jr.
>Version: 1.2.9
>OS: Linux 2.2.14
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (203.176.35.2)
>
>
>There is a problem locating entries where a value in a multivalued attribute is
>deleted.  The search filter should use the multivalued attribute using '*' on
>the leftmost side, i.e. mailalternateaddress=*somedomain.com.
>Kurt D. Zeilenga <Kurt@OpenLDAP.org> says that this is an indexing bug in
>1.2.9.
>I guess this would only be noticed if you have multivalued attribute.
>
>Here are outputs from openLDAP command line tools to reproduce the problem:
>
>* Start by displaying current data
>
>[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
>"mailalternateaddress=*somedomain.com.ph" 
>-D "cn=test, dc=surfshop.net, dc=ph" -W
>Enter LDAP Password:
>
>cn=bench, dc=surfshop.net, dc=ph
>cn=Benjamin de los Angeles Jr.
>sn=de los Angeles
>objectclass=person
>objectclass=organizationalPerson
>.
>.
>.
>mailalternateaddress=zwark@somedomain.com.ph
>mailalternateaddress=lazone@somedomain.com.ph
>
>* Delete a value from a multivalued attribute using modify
>
>MODIFY Data in a file:
>
>dn: cn=bench, dc=surfshop.net, dc=ph
>changetype: modify
>delete: mailalternateaddress
>mailalternateaddress: lazone@somedomain.com.ph
>
>[bench@ldap tools]$ ./ldapmodify -v -D "cn=test, dc=surfshop.net, dc=ph"
>                      -W -f tempdata/modify-delete
>Enter LDAP Password:
>delete mailalternateaddress:
>       lazone@somedomain.com.ph
>modifying entry cn=bench, dc=surfshop.net, dc=ph 
>modify complete
>
>* Display the matching entry again
>
>[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
>                    "mailalternateaddress=*somedomain.com.ph" 
>                    -D "cn=test, dc=surfshop.net, dc=ph" -W  
>
>Enter LDAP Password:
>
>(No output! This is the PROBLEM)
>
>* Add again an entry
>
>DATA in a file:
>
>dn: cn=bench, dc=surfshop.net, dc=ph
>changetype: modify
>add: mailalternateaddress
>mailalternateaddress: lazone@somedomain.com.ph
> 
>[bench@ldap tools]$ ./ldapmodify -v -D "cn=test, dc=surfshop.net, dc=ph"
>                    -W -f tempdata/modify-add
>Enter LDAP Password:
>add mailalternateaddress:
>        lazone@somedomain.com.ph
>modifying entry cn=bench, dc=surfshop.net, dc=ph
>modify complete
>
>* Display the matching entry again
>
>[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
>                    "mailalternateaddress=*somedomain.com.ph" 
>                    -D "cn=test, dc=surfshop.net, dc=ph" -W
>Enter LDAP Password:
>
>cn=bench, dc=surfshop.net, dc=ph
>cn=Benjamin de los Angeles Jr.
>sn=de los Angeles
>objectclass=person
>objectclass=organizationalPerson
>.
>.
>.
>mailalternateaddress=zwark@somedomain.com.ph
>mailalternateaddress=lazone@somedomain.com.ph
>
>( Magic! There goes the entry again! =) )
>
>
>
>
Comment 2 Benjamin de los Angeles Jr. 2000-03-19 10:21:55 UTC
I applied the patch, and the problem has been solved.
Thanks Kurt! :)

On Sat, Mar 18, 2000 at 01:12:07PM -0800, Kurt D. Zeilenga wrote:
> OPENLDAP_REL_ENG_1_2 (available via CVS) includes a fix designed
> to resolve this issue.  Please test.
> 
> 	Kurt
> 
> At 01:23 AM 3/18/00 GMT, bench@surfshop.net.ph wrote:
> >Full_Name: Benjamin de los Angeles Jr.
> >Version: 1.2.9
> >OS: Linux 2.2.14
> >URL: ftp://ftp.openldap.org/incoming/
> >Submission from: (NULL) (203.176.35.2)
> >
> >
> >There is a problem locating entries where a value in a multivalued attribute is
> >deleted.  The search filter should use the multivalued attribute using '*' on
> >the leftmost side, i.e. mailalternateaddress=*somedomain.com.
> >Kurt D. Zeilenga <Kurt@OpenLDAP.org> says that this is an indexing bug in
> >1.2.9.
> >I guess this would only be noticed if you have multivalued attribute.
> >
> >Here are outputs from openLDAP command line tools to reproduce the problem:
> >
> >* Start by displaying current data
> >
> >[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
> >"mailalternateaddress=*somedomain.com.ph" 
> >-D "cn=test, dc=surfshop.net, dc=ph" -W
> >Enter LDAP Password:
> >
> >cn=bench, dc=surfshop.net, dc=ph
> >cn=Benjamin de los Angeles Jr.
> >sn=de los Angeles
> >objectclass=person
> >objectclass=organizationalPerson
> >.
> >.
> >.
> >mailalternateaddress=zwark@somedomain.com.ph
> >mailalternateaddress=lazone@somedomain.com.ph
> >
> >* Delete a value from a multivalued attribute using modify
> >
> >MODIFY Data in a file:
> >
> >dn: cn=bench, dc=surfshop.net, dc=ph
> >changetype: modify
> >delete: mailalternateaddress
> >mailalternateaddress: lazone@somedomain.com.ph
> >
> >[bench@ldap tools]$ ./ldapmodify -v -D "cn=test, dc=surfshop.net, dc=ph"
> >                      -W -f tempdata/modify-delete
> >Enter LDAP Password:
> >delete mailalternateaddress:
> >       lazone@somedomain.com.ph
> >modifying entry cn=bench, dc=surfshop.net, dc=ph 
> >modify complete
> >
> >* Display the matching entry again
> >
> >[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
> >                    "mailalternateaddress=*somedomain.com.ph" 
> >                    -D "cn=test, dc=surfshop.net, dc=ph" -W  
> >
> >Enter LDAP Password:
> >
> >(No output! This is the PROBLEM)
> >
> >* Add again an entry
> >
> >DATA in a file:
> >
> >dn: cn=bench, dc=surfshop.net, dc=ph
> >changetype: modify
> >add: mailalternateaddress
> >mailalternateaddress: lazone@somedomain.com.ph
> > 
> >[bench@ldap tools]$ ./ldapmodify -v -D "cn=test, dc=surfshop.net, dc=ph"
> >                    -W -f tempdata/modify-add
> >Enter LDAP Password:
> >add mailalternateaddress:
> >        lazone@somedomain.com.ph
> >modifying entry cn=bench, dc=surfshop.net, dc=ph
> >modify complete
> >
> >* Display the matching entry again
> >
> >[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
> >                    "mailalternateaddress=*somedomain.com.ph" 
> >                    -D "cn=test, dc=surfshop.net, dc=ph" -W
> >Enter LDAP Password:
> >
> >cn=bench, dc=surfshop.net, dc=ph
> >cn=Benjamin de los Angeles Jr.
> >sn=de los Angeles
> >objectclass=person
> >objectclass=organizationalPerson
> >.
> >.
> >.
> >mailalternateaddress=zwark@somedomain.com.ph
> >mailalternateaddress=lazone@somedomain.com.ph
> >
> >( Magic! There goes the entry again! =) )
> >
> >
> >
> >
Comment 3 Kurt Zeilenga 2000-03-19 11:18:51 UTC
changed notes
changed state Open to Release
moved from Incoming to Software Bugs
Comment 4 Kurt Zeilenga 2000-05-04 03:58:28 UTC
changed state Release to Closed
Comment 5 OpenLDAP project 2014-08-01 21:06:54 UTC
Patches applied to -devel and re1.2