diff options
author | unknown <bar@mysql.com> | 2005-01-13 18:12:04 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-01-13 18:12:04 +0400 |
commit | 9842aca3ef48bf56a6c3ee5b9e1159e4249ce346 (patch) | |
tree | 89b4be1d3a807d6f2554dce92b0a5ecd0a9009ab /strings/ctype-big5.c | |
parent | bcb3783c7c88b06a8417a5734103ae856a2f7dbc (diff) | |
download | mariadb-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.c | 5 |
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 |