1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

strnxfrm() for simple and binary charsets fixes

This commit is contained in:
unknown
2003-01-16 15:20:38 +04:00
parent 3604aa00a3
commit 80d2517412
3 changed files with 29 additions and 58 deletions

View File

@ -29,10 +29,11 @@ int my_strnxfrm_simple(CHARSET_INFO * cs,
const uchar *src, uint srclen)
{
uchar *map= cs->sort_order;
const uchar *end;
DBUG_ASSERT(len >= srclen);
len= min(len,srclen);
for ( ; len > 0 ; len-- )
for ( end=src+len; src < end ; )
*dest++= map[*src++];
return len;
}