diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-10-10 14:36:09 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2016-10-10 14:36:09 +0400 |
commit | 5058ced5df7a4ee3ff011577829fb2e4a6f47843 (patch) | |
tree | 8f90cd07e71cef5dc09adfd825712f812f978f57 /sql/item_sum.cc | |
parent | a6f032af5778018051d41fc8ba7e9c983b4b7fbf (diff) | |
download | mariadb-git-5058ced5df7a4ee3ff011577829fb2e4a6f47843.tar.gz |
MDEV-7769 MY_CHARSET_INFO refactoring# On branch 10.2
Part 3 (final): removing MY_CHARSET_HANDLER::well_formed_len().
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 83378c2e994..51a6c2bd3eb 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -3156,21 +3156,18 @@ int dump_leaf_key(void* key_arg, element_count count __attribute__((unused)), /* stop if length of result more than max_length */ if (result->length() > max_length) { - int well_formed_error; CHARSET_INFO *cs= item->collation.collation; const char *ptr= result->ptr(); - uint add_length; THD *thd= current_thd; /* It's ok to use item->result.length() as the fourth argument as this is never used to limit the length of the data. Cut is done with the third argument. */ - add_length= cs->cset->well_formed_len(cs, - ptr + old_length, - ptr + max_length, - result->length(), - &well_formed_error); + uint add_length= Well_formed_prefix(cs, + ptr + old_length, + ptr + max_length, + result->length()).length(); result->length(old_length + add_length); item->warning_for_row= TRUE; push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, |