mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 09:04:29 +02:00
bug#7284: strnxfrm returns different results for equal strings
This commit is contained in:
parent
9cea2457ec
commit
e3d6e6736b
34 changed files with 344 additions and 45 deletions
|
|
@ -412,13 +412,14 @@ static int my_strnncollsp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
|
|||
|
||||
|
||||
static int my_strnxfrm_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
|
||||
uchar * dest, uint len,
|
||||
const uchar *src,
|
||||
uint srclen __attribute__((unused)))
|
||||
uchar * dest, uint dstlen,
|
||||
const uchar *src, uint srclen)
|
||||
{
|
||||
if (dest != src)
|
||||
memcpy(dest,src,len= min(len,srclen));
|
||||
return len;
|
||||
memcpy(dest, src, min(dstlen, srclen));
|
||||
if (dstlen > srclen)
|
||||
bfill(dest + srclen, dstlen - srclen, ' ');
|
||||
return dstlen;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue