Full_Name: Julien COMBES Version: 2.4.36 OS: debian squeeze URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (212.23.175.188)
Hello,
With openldap 2.4.36, i found a case where the aliases are deref differently between hdb and mdb. A search with deref aliases on an attribut not indexed (or on "*"), mdb backend returns the entry twice where hdb backend returns the entry once. For example :
With a directory like that : --------------------------------------------------------------------- dn: dc=test,dc=com objectClass: top objectClass: dcObject objectClass: organization dc: test o: test
dn: ou=a,dc=test,dc=com objectClass: top objectClass: organizationalUnit ou: a
dn: ou=b,ou=a,dc=test,dc=com objectClass: top objectClass: organizationalUnit ou: b
dn: ou=c,ou=a,dc=test,dc=com objectClass: top objectClass: organizationalUnit ou: c
dn: cn=foo,ou=b,ou=a,dc=test,dc=com objectClass: top objectClass: person cn: foo sn: foo
dn: cn=bar,ou=c,ou=a,dc=test,dc=com objectClass: top objectClass: alias objectClass: extensibleObject aliasedObjectName: cn=foo,ou=b,ou=a,dc=test,dc=com cn: bar ---------------------------------------------------------------------
I have that kind of result :
-> Search on mdb, cn not indexed : $ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=foo dn -a always dn: cn=foo,ou=b,ou=a,dc=test,dc=com dn: cn=foo,ou=b,ou=a,dc=test,dc=com
$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=* dn -a always dn: cn=foo,ou=b,ou=a,dc=test,dc=com dn: cn=foo,ou=b,ou=a,dc=test,dc=com
-> Search on mdb, cn indexed eq,sub : $ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=foo dn -a always dn: cn=foo,ou=b,ou=a,dc=test,dc=com
$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=* dn -a always dn: cn=foo,ou=b,ou=a,dc=test,dc=com dn: cn=foo,ou=b,ou=a,dc=test,dc=com
-> Search on hdb, cn not indexed : $ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=foo dn -a always dn: cn=foo,ou=b,ou=a,dc=test,dc=com
$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=* dn -a always dn: cn=foo,ou=b,ou=a,dc=test,dc=com
-> Search on hdb $ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=foo dn -a always dn: cn=foo,ou=b,ou=a,dc=test,dc=commits
$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=* dn -a always dn: cn=foo,ou=b,ou=a,dc=test,dc=com
Regards, Julien COMBES P.S: I have first posted this message as a comment in ITS7577 the 25 Jul 2013. But as the ITS7577 is tagged closed and has no answers since this date, I decide to repost as a new report.