summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2016-10-10 14:36:09 +0400
committerAlexander Barkov <bar@mariadb.org>2016-10-10 14:36:09 +0400
commit5058ced5df7a4ee3ff011577829fb2e4a6f47843 (patch)
tree8f90cd07e71cef5dc09adfd825712f812f978f57 /sql/item_timefunc.cc
parenta6f032af5778018051d41fc8ba7e9c983b4b7fbf (diff)
downloadmariadb-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_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 41dc96717fe..5e0ae028d88 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2468,13 +2468,9 @@ String *Item_char_typecast::val_str(String *str)
if (!charset_conversion)
{
// Try to reuse the original string (if well formed).
- MY_STRCOPY_STATUS status;
- cs->cset->well_formed_char_length(cs, res->ptr(), res->end(),
- cast_length, &status);
- if (!status.m_well_formed_error_pos)
- {
- res= reuse(res, status.m_source_end_pos - res->ptr());
- }
+ Well_formed_prefix prefix(cs, res->ptr(), res->end(), cast_length);
+ if (!prefix.well_formed_error_pos())
+ res= reuse(res, prefix.length());
goto end;
}
// Character set conversion, or bad bytes were found.