Adding a new parameter for well_formed_length to

return error. We'll use it for better warnign reporting.
This commit is contained in:
unknown 2005-04-06 11:53:15 +05:00
commit 5687fe36bf
12 changed files with 57 additions and 27 deletions

View file

@ -1267,11 +1267,11 @@ uint my_charpos_ucs2(CHARSET_INFO *cs __attribute__((unused)),
static
uint my_well_formed_len_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *b,
const char *e,
uint nchars)
const char *b, const char *e,
uint nchars, int *error)
{
uint nbytes= (e-b) & ~ (uint)1;
*error= 0;
nchars*= 2;
return min(nbytes, nchars);
}