diff options
author | Alexander Barkov <bar@mariadb.org> | 2014-09-01 20:57:32 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2014-09-01 20:57:32 +0400 |
commit | 1427e1db99ac44dedbc78e8655742a8ed9bfd755 (patch) | |
tree | a848c06ceed3a3a7a69e6ce159f92d2c3f96c5f0 /sql/item_strfunc.cc | |
parent | 18b307a7d23fd59b4a831e3e95207e2e34f56b6e (diff) | |
download | mariadb-git-1427e1db99ac44dedbc78e8655742a8ed9bfd755.tar.gz |
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().
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index bb999f132c4..78cb5badc65 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2328,32 +2328,6 @@ void Item_func_decode::crypto_transform(String *res) } -Item *Item_func_sysconst::safe_charset_converter(CHARSET_INFO *tocs) -{ - Item_string *conv; - uint conv_errors; - String tmp, cstr, *ostr= val_str(&tmp); - if (null_value) - { - Item *null_item= new Item_null((char *) fully_qualified_func_name()); - null_item->collation.set (tocs); - return null_item; - } - cstr.copy(ostr->ptr(), ostr->length(), ostr->charset(), tocs, &conv_errors); - if (conv_errors || - !(conv= new Item_static_string_func(fully_qualified_func_name(), - cstr.ptr(), cstr.length(), - cstr.charset(), - collation.derivation))) - { - return NULL; - } - conv->str_value.copy(); - conv->str_value.mark_as_const(); - return conv; -} - - String *Item_func_database::val_str(String *str) { DBUG_ASSERT(fixed == 1); |