https://bugs.openldap.org/show_bug.cgi?id=9747
--- Comment #2 from henson@acm.org henson@acm.org --- (In reply to Howard Chu from comment #1)
Please test https://git.openldap.org/openldap/openldap/-/merge_requests/442
I rebuilt the 2.5.9 rpm with this patch and the compare operation appears to work correctly now.
Thanks for the quick fix.