diff options
author | serg@serg.mysql.com <> | 2003-03-14 20:25:50 +0100 |
---|---|---|
committer | serg@serg.mysql.com <> | 2003-03-14 20:25:50 +0100 |
commit | 15ff383e205179990c1a8b2543667dce32cb2900 (patch) | |
tree | 0501a5801c892812a3f56959e6aa170d5999ba4f /strings | |
parent | 88df7b695bb9b2f34030724dccc7770197d5a95f (diff) | |
parent | 9749ece292d3356c5b52031eb27aa92e2036207d (diff) | |
download | mariadb-git-15ff383e205179990c1a8b2543667dce32cb2900.tar.gz |
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.1
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-bin.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 9f5cad01cb2..33855bfcdcd 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -75,6 +75,21 @@ static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)), return cmp ? cmp : (int) (slen - tlen); } +static int my_strnncollsp_binary(CHARSET_INFO * cs, + const uchar *s, uint slen, + const uchar *t, uint tlen) +{ + int len, cmp; + + for ( ; slen && my_isspace(cs, s[slen-1]) ; slen--); + for ( ; tlen && my_isspace(cs, t[tlen-1]) ; tlen--); + + len = ( slen > tlen ) ? tlen : slen; + + cmp= memcmp(s,t,len); + return cmp ? cmp : (int) (slen - tlen); +} + static void my_caseup_str_bin(CHARSET_INFO *cs __attribute__((unused)), char *str __attribute__((unused))) { @@ -309,7 +324,7 @@ CHARSET_INFO my_charset_bin = "","", 0, /* strxfrm_multiply */ my_strnncoll_binary, /* strnncoll */ - my_strnncoll_binary, + my_strnncollsp_binary, my_strnxfrm_bin, /* strxnfrm */ my_like_range_simple, /* like_range */ my_wildcmp_bin, /* wildcmp */ |