mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context
MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string) Item_static_string_func::safe_charset_converter() and Item_hex_string::safe_charset_converter() did not handle character sets with mbminlen>1 properly, as well as did not handle conversion from binary to multi-byte well. Introducing Item::const_charset_converter(), to reuse it in a number of Item_*::safe_charset_converter().
This commit is contained in:
@ -351,6 +351,10 @@ public:
|
||||
bool set_or_copy_aligned(const char *s, uint32 arg_length, CHARSET_INFO *cs);
|
||||
bool copy(const char*s,uint32 arg_length, CHARSET_INFO *csfrom,
|
||||
CHARSET_INFO *csto, uint *errors);
|
||||
bool copy(const String *str, CHARSET_INFO *tocs, uint *errors)
|
||||
{
|
||||
return copy(str->ptr(), str->length(), str->charset(), tocs, errors);
|
||||
}
|
||||
void move(String &s)
|
||||
{
|
||||
free();
|
||||
@ -517,6 +521,12 @@ public:
|
||||
{
|
||||
return (s->alloced && Ptr >= s->Ptr && Ptr < s->Ptr + s->str_length);
|
||||
}
|
||||
uint well_formed_length() const
|
||||
{
|
||||
int dummy_error;
|
||||
return charset()->cset->well_formed_len(charset(), ptr(), ptr() + length(),
|
||||
length(), &dummy_error);
|
||||
}
|
||||
bool is_ascii() const
|
||||
{
|
||||
if (length() == 0)
|
||||
|
Reference in New Issue
Block a user