summaryrefslogtreecommitdiff
path: root/strings/ctype-win1250ch.c
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-01-31 13:48:35 +0400
committerunknown <bar@bar.mysql.r18.ru>2003-01-31 13:48:35 +0400
commit41538a4a2b606d62e4a86fc4d72e003cad13e79b (patch)
tree8e0320352c1ef07c08e1cb4e613ca6f98b21604a /strings/ctype-win1250ch.c
parent884e73346b125a796cccecd7c81a0b275cb63331 (diff)
downloadmariadb-git-41538a4a2b606d62e4a86fc4d72e003cad13e79b.tar.gz
New CHARSET_INFO function to compare strings regardless to trailing spaces
Diffstat (limited to 'strings/ctype-win1250ch.c')
-rw-r--r--strings/ctype-win1250ch.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index f5074a4ec0e..3ed48f13913 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -503,6 +503,17 @@ static int my_strnncoll_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
return 0;
}
+static
+int my_strnncollsp_win1250ch(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_win1250ch(cs,s,slen,t,tlen);
+}
+
+
static int my_strnxfrm_win1250ch(CHARSET_INFO * cs __attribute__((unused)),
uchar * dest, uint len,
const uchar * src, uint srclen) {
@@ -644,6 +655,7 @@ CHARSET_INFO my_charset_win1250ch =
idx_uni_cp1250, /* tab_from_uni */
2, /* strxfrm_multiply */
my_strnncoll_win1250ch,
+ my_strnncollsp_win1250ch,
my_strnxfrm_win1250ch,
my_like_range_win1250ch,
my_wildcmp_8bit, /* wildcmp */