diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-01-14 18:28:50 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-01-14 18:28:50 +0400 |
commit | 5ce475835c84a79279b78838edc5113329a785ca (patch) | |
tree | 3144649134643eea925951158fa9473a75197666 /strings | |
parent | 8b255948974868d0c5281ab81e17e789c7a0894f (diff) | |
download | mariadb-git-5ce475835c84a79279b78838edc5113329a785ca.tar.gz |
bin chatset now handles strnncoll itself so we don't have to check
if charset is binary anymore
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-bin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 0d7729721ad..e20afff1470 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -47,8 +47,8 @@ static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, uint slen, const uchar *t, uint tlen) { - int len = ( slen > tlen ) ? tlen : slen; - return memcmp(s,t,len); + int cmp= memcmp(s,t,min(slen,tlen)); + return cmp ? cmp : (int) (slen - tlen); } static void my_caseup_str_bin(CHARSET_INFO *cs __attribute__((unused)), |