mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion
This commit is contained in:
@ -1022,8 +1022,15 @@ well_formed_copy_nchars(CHARSET_INFO *to_cs,
|
||||
wc= '?';
|
||||
}
|
||||
else
|
||||
break; // Not enough characters
|
||||
|
||||
{
|
||||
if ((uchar *) from >= from_end)
|
||||
break; // End of line
|
||||
// Incomplete byte sequence
|
||||
if (!*well_formed_error_pos)
|
||||
*well_formed_error_pos= from;
|
||||
from++;
|
||||
wc= '?';
|
||||
}
|
||||
outp:
|
||||
if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0)
|
||||
to+= cnvres;
|
||||
|
Reference in New Issue
Block a user