diff options
author | bar@bar.mysql.r18.ru <> | 2003-01-31 13:48:35 +0400 |
---|---|---|
committer | bar@bar.mysql.r18.ru <> | 2003-01-31 13:48:35 +0400 |
commit | 52c053ca9b3a7a911eb56588335b742c65c56aaf (patch) | |
tree | 8e0320352c1ef07c08e1cb4e613ca6f98b21604a /strings/ctype-sjis.c | |
parent | 0a48aeb2c1ba7b885d322dd9641d3f31469972a4 (diff) | |
download | mariadb-git-52c053ca9b3a7a911eb56588335b742c65c56aaf.tar.gz |
New CHARSET_INFO function to compare strings regardless to trailing spaces
Diffstat (limited to 'strings/ctype-sjis.c')
-rw-r--r-- | strings/ctype-sjis.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index b666bdf20d2..4d9bb4be30c 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -227,6 +227,16 @@ static int my_strnncoll_sjis(CHARSET_INFO *cs __attribute__((unused)), return len1 - len2; } +static +int my_strnncollsp_sjis(CHARSET_INFO * cs, + const uchar *s, uint slen, + const uchar *t, uint tlen) +{ + for ( ; slen && my_isspace(cs, s[slen-1]) ; slen--); + for ( ; tlen && my_isspace(cs, t[tlen-1]) ; tlen--); + return my_strnncoll_sjis(cs,s,slen,t,tlen); +} + static int my_strnxfrm_sjis(CHARSET_INFO *cs __attribute__((unused)), uchar *dest, uint len, const uchar *src, uint srclen) @@ -4478,6 +4488,7 @@ CHARSET_INFO my_charset_sjis = NULL, /* tab_from_uni */ 1, /* strxfrm_multiply */ my_strnncoll_sjis, + my_strnncollsp_sjis, my_strnxfrm_sjis, my_like_range_sjis, my_wildcmp_mb, /* wildcmp */ |