Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/543
I have performed sorting in ldapsearch operation with all the combination of two attributes (sn, telephonenumber). I have made the 'sn' values of all the entries same and the 'telephonenumber' values different so that the sorting order for all the search results will be same. But the sorting order for the search results are not same as expected. When I sort with "sn", "sn telephonenumber" and "telephonenumber sn" the ordering of the search results are same. The search results of "telephonenumber" sort is different from other results. At least the search results for sorting with "telephonenumber" and "telephonenumber sn" should give similar results as all the entries have same 'sn' value.
Note: It is reproduced in 389 DS-1.2.15
Reproducer details:
----------------------------------------------------------------------
The data I have uploaded to the database is given below
dirsrv12@dirsrv12-VirtualBox:~$ cat data.ldif
dn: uid=scarter, ou=People, dc=asiapacific,dc=hpqcorp,dc=net
cn: Sam Carter
sn: Test sn
givenname: Sam
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
uid: scarter
telephonenumber: 12
dn: uid=tmorris, ou=People, dc=asiapacific,dc=hpqcorp,dc=net
cn: Ted Morris
sn: Test sn
givenname: Ted
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
uid: tmorris
telephonenumber: 1 3
dn: uid=kvaughan, ou=People, dc=asiapacific,dc=hpqcorp,dc=net
cn: Ken kvaughan
sn: Test sn
givenname: Kirsten
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
uid: kvaughan
telephonenumber: 1 23
The sorting search results for all the combinations are given below
Sorting with sn
dirsrv12@dirsrv12-VirtualBox:~$ ldapsearch -h dirsrv12-VirtualBox -p 389 -b "ou=people,dc=asiapacific,dc=hpqcorp,dc=net" -s one -S "sn" -x "(objectclass=inetorgperson)" sn telephonenumber
# extended LDIF
#
# LDAPv3
# base <ou=people,dc=asiapacific,dc=hpqcorp,dc=net> with scope oneLevel
# filter: (objectclass=inetorgperson)
# requesting: sn telephonenumber
#
# scarter, People, asiapacific.hpqcorp.net
dn: uid=scarter,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 12
# tmorris, People, asiapacific.hpqcorp.net
dn: uid=tmorris,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 1 3
# kvaughan, People, asiapacific.hpqcorp.net
dn: uid=kvaughan,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 1 23
# search result
search: 2
result: 0 Success
# numResponses: 4
# numEntries: 3
Sorting with telephonenumber
dirsrv12@dirsrv12-VirtualBox:~$ ldapsearch -h dirsrv12-VirtualBox -p 389 -b "ou=people,dc=asiapacific,dc=hpqcorp,dc=net" -s one -S "telephonenumber" -x "(objectclass=inetorgperson)" sn telephonenumber
# extended LDIF
#
# LDAPv3
# base <ou=people,dc=asiapacific,dc=hpqcorp,dc=net> with scope oneLevel
# filter: (objectclass=inetorgperson)
# requesting: sn telephonenumber
#
# kvaughan, People, asiapacific.hpqcorp.net
dn: uid=kvaughan,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 1 23
# tmorris, People, asiapacific.hpqcorp.net
dn: uid=tmorris,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 1 3
# scarter, People, asiapacific.hpqcorp.net
dn: uid=scarter,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 12
# search result
search: 2
result: 0 Success
# numResponses: 4
# numEntries: 3
Sorting with telephonenumber sn
dirsrv12@dirsrv12-VirtualBox:~$ ldapsearch -h dirsrv12-VirtualBox -p 389 -b "ou=people,dc=asiapacific,dc=hpqcorp,dc=net" -s one -S "telephonenumber sn" -x "(objectclass=inetorgperson)" sn telephonenumber
# extended LDIF
#
# LDAPv3
# base <ou=people,dc=asiapacific,dc=hpqcorp,dc=net> with scope oneLevel
# filter: (objectclass=inetorgperson)
# requesting: sn telephonenumber
#
# scarter, People, asiapacific.hpqcorp.net
dn: uid=scarter,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 12
# tmorris, People, asiapacific.hpqcorp.net
dn: uid=tmorris,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 1 3
# kvaughan, People, asiapacific.hpqcorp.net
dn: uid=kvaughan,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 1 23
# search result
search: 2
result: 0 Success
# numResponses: 4
# numEntries: 3
Sorting with sn telephonenumber
dirsrv12@dirsrv12-VirtualBox:~$ ldapsearch -h dirsrv12-VirtualBox -p 389 -b "ou=people,dc=asiapacific,dc=hpqcorp,dc=net" -s one -S "sn telephonenumber" -x "(objectclass=inetorgperson)" sn telephonenumber
# extended LDIF
#
# LDAPv3
# base <ou=people,dc=asiapacific,dc=hpqcorp,dc=net> with scope oneLevel
# filter: (objectclass=inetorgperson)
# requesting: sn telephonenumber
#
# scarter, People, asiapacific.hpqcorp.net
dn: uid=scarter,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 12
# tmorris, People, asiapacific.hpqcorp.net
dn: uid=tmorris,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 1 3
# kvaughan, People, asiapacific.hpqcorp.net
dn: uid=kvaughan,ou=People,dc=asiapacific,dc=hpqcorp,dc=net
sn: Test sn
telephonenumber: 1 23
# search result
search: 2
result: 0 Success
# numResponses: 4
# numEntries: 3
Comment 1Sankar Ramalingam
2013-08-05 11:16:07 UTC
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata). When the errata is created, the bugs should be automatically moved back to ON_QA.
Comment 4Sankar Ramalingam
2013-12-20 11:26:44 UTC
Automated test cases added to clu/cluSearch.sh : trac543
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.