summaryrefslogtreecommitdiff
path: root/strings/ctype-tis620.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-tis620.c
parentbcb3783c7c88b06a8417a5734103ae856a2f7dbc (diff)
downloadmariadb-git-9842aca3ef48bf56a6c3ee5b9e1159e4249ce346.tar.gz
bug#7284: strnxfrm returns different results for equal strings
Diffstat (limited to 'strings/ctype-tis620.c')
-rw-r--r--strings/ctype-tis620.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 5d37aa965d9..3a43c556ac8 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -631,9 +631,13 @@ int my_strnxfrm_tis620(CHARSET_INFO *cs __attribute__((unused)),
uchar * dest, uint len,
const uchar * src, uint srclen)
{
+ uint dstlen= len;
len= (uint) (strmake((char*) dest, (char*) src, min(len, srclen)) -
(char*) dest);
- return (int) thai2sortable(dest, len);
+ len= thai2sortable(dest, len);
+ if (dstlen > len)
+ bfill(dest + len, dstlen - len, ' ');
+ return dstlen;
}