diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-01-26 17:52:24 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2016-01-26 17:52:24 +0400 |
commit | 77c75a46cfe9ffa914c73fe129dec743b80ed57b (patch) | |
tree | 0d41f8dcaea54c93ccfe037b5b1f5f8b9baefb5e /sql/item_strfunc.cc | |
parent | 71b39066d4320e74e5ad73f4f5a6d436e32f14f3 (diff) | |
download | mariadb-git-77c75a46cfe9ffa914c73fe129dec743b80ed57b.tar.gz |
A clean-up patch for Item_func_conv_charset (needed for MDEV-9181)
Removing the "conv_charset" member and using collation.collation
instead, as they duplicated each other.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 6c49c02f9aa..9880db7745a 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -3404,7 +3404,7 @@ String *Item_func_conv_charset::val_str(String *str) String *arg= args[0]->val_str(str); String_copier_for_item copier(current_thd); return ((null_value= args[0]->null_value || - copier.copy_with_warn(conv_charset, &tmp_value, + copier.copy_with_warn(collation.collation, &tmp_value, arg->charset(), arg->ptr(), arg->length(), arg->length()))) ? 0 : &tmp_value; @@ -3412,7 +3412,7 @@ String *Item_func_conv_charset::val_str(String *str) void Item_func_conv_charset::fix_length_and_dec() { - collation.set(conv_charset, DERIVATION_IMPLICIT); + DBUG_ASSERT(collation.derivation == DERIVATION_IMPLICIT); fix_char_length(args[0]->max_char_length()); } @@ -3421,7 +3421,7 @@ void Item_func_conv_charset::print(String *str, enum_query_type query_type) str->append(STRING_WITH_LEN("convert(")); args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" using ")); - str->append(conv_charset->csname); + str->append(collation.collation->csname); str->append(')'); } |