summaryrefslogtreecommitdiff
path: root/strings/ctype-big5.c
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-01-13 18:12:04 +0400
committerunknown <bar@mysql.com>2005-01-13 18:12:04 +0400
commit9842aca3ef48bf56a6c3ee5b9e1159e4249ce346 (patch)
tree89b4be1d3a807d6f2554dce92b0a5ecd0a9009ab /strings/ctype-big5.c
parentbcb3783c7c88b06a8417a5734103ae856a2f7dbc (diff)
downloadmariadb-git-9842aca3ef48bf56a6c3ee5b9e1159e4249ce346.tar.gz
bug#7284: strnxfrm returns different results for equal strings
Diffstat (limited to 'strings/ctype-big5.c')
-rw-r--r--strings/ctype-big5.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 8345c53202c..997b8ce93d6 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -298,6 +298,7 @@ static int my_strnxfrm_big5(CHARSET_INFO *cs __attribute__((unused)),
const uchar * src, uint srclen)
{
uint16 e;
+ uint dstlen= len;
len = srclen;
while (len--)
@@ -312,7 +313,9 @@ static int my_strnxfrm_big5(CHARSET_INFO *cs __attribute__((unused)),
} else
*dest++ = sort_order_big5[(uchar) *src++];
}
- return srclen;
+ if (dstlen > srclen)
+ bfill(dest, dstlen - srclen, ' ');
+ return dstlen;
}
#if 0