Problem fix:

http://bugs.mysql.com/bug.php?id=2366
Wrong utf8 behaviour when data is trancated
This commit is contained in:
bar@bar.intranet.mysql.r18.ru 2004-02-06 16:59:25 +04:00
commit d13ad0822e
20 changed files with 105 additions and 28 deletions

View file

@ -274,6 +274,22 @@ uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)),
return pos ? e+2-b0 : b-b0;
}
uint my_wellformedlen_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e, uint pos)
{
uint mblen;
const char *b0=b;
while (pos && b<e)
{
b+= (mblen= my_ismbchar(cs,b,e)) ? mblen : 1;
pos--;
}
return b-b0;
}
uint my_instr_mb(CHARSET_INFO *cs,
const char *b, uint b_length,
const char *s, uint s_length,