It is observed that with search base "o=system,cn=cordys,cn=ucloud,o=itsmydomain.com" we are getting the expected results. We are seeing this behaviour with hdb database, but not with bdb. But we want to stick to hdb only. Is there any workaround to fix the issue(something like changing the configuration settings)? It is also observed that in both cases bdb_substring_candidates value is 2 but bdb_search_candidates value is different. I am not sure if this observation is relevant or not.
What openldap version are you using?I would note that your "working base" of "o=system,cn=cordys,cn=ucloud,o=itsmydomain.com" is not listed in either case 1 or case 2 as a base you used, and that in both case 1 and case 2, you say you got the same result. So based off of what you sent in email, everything appears to be working and neither case appears related to your complaint... You'll need to provide more precise information.
Since you didn't state what version of OpenLDAP you're using, one could endlessly speculate on potential fixed bugs over the last 5+ years that could result in the behavior you're reporting.
--Quanah -- Quanah Gibson-Mount Server Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration