From http://pubs.opengroup.org/onlinepubs/009695399/functions/strcasecmp.html: ... In the POSIX locale, strcasecmp() and strncasecmp() shall behave as if the strings had been converted to lowercase and then a byte comparison performed. The results are unspecified in other locales. ... Currently we get the following results: strcasecmp(aaaaaaaa,_aaaaaaa) = 2 strcasecmp_m(aaaaaaaa,_aaaaaaa) = 2 strcasecmp(Aaaaaaaa,_aaaaaaa) = 2 strcasecmp_m(Aaaaaaaa,_aaaaaaa) = -30 strcasecmp(Aaaaaaaaa,b_aaaaaaa) = -1 strcasecmp_m(Aaaaaaaaa,b_aaaaaaa) = -33 strcasecmp(aAaaaaaaaa,Bb_aaaaaaa) = -1 strcasecmp_m(aAaaaaaaaa,Bb_aaaaaaa) = 31 This is trivial to fix, but we need to watch out for cases where we possibly store sorted arrays in persistent databases and later to binary search on it. Andrew, do you know about any places where we store sorted arrays in databases, maybe for ldb indexes?
The ldb index is unsorted, and the schema cache bisection is based on a run-time built table. My new GUID patches will be the first time LDB is sorted in the DB, and that is by memcmp() ordering. The ldb pack format is not sorted either.
Pushed v4-{6,7}-test after getting review from slow@samba.org