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

MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)

The code did not take into account that:
- U+005C (backslash) can occupy more than mbminlen characters (e.g. in sjis)
- Some character sets do not have a code for U+005C (e.g. swe7)

Adding a new function my_wc_to_printable into MY_CHARSET_HANDLER to
cover all special cases easier.
This commit is contained in:
Alexander Barkov
2020-05-07 19:20:17 +04:00
parent c675886dcd
commit cfe5ee90c8
25 changed files with 242 additions and 18 deletions

View File

@ -791,7 +791,7 @@ bool Binary_string::copy_printable_hhhh(CHARSET_INFO *to_cs,
if (bytes_needed >= UINT_MAX32 || alloc((size_t) bytes_needed))
return true;
str_length= my_convert_using_func(Ptr, Alloced_length, to_cs,
my_wc_to_printable_generic,
to_cs->cset->wc_to_printable,
from, from_length,
from_cs,
from_cs->cset->mb_wc,