diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-08-14 09:23:03 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-08-14 09:23:03 +0400 |
commit | e99bc0d1e21a2048b8fda1719e778ee8ffd1adcc (patch) | |
tree | 644718f810b842f2eab76aaa2c8e5f4837a925c5 /sql/sql_string.h | |
parent | 0750b2df37fb7d6d28e192e3046b4c406ff42779 (diff) | |
download | mariadb-git-e99bc0d1e21a2048b8fda1719e778ee8ffd1adcc.tar.gz |
Removing unused String_copier::copy_fix.
Fixing misleading comments in String_copiers::well_formed_copy().
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index 547ad54149b..46188ce4652 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -69,8 +69,7 @@ public: srccs, src, src_length, nchars, this); } /* - Copy a string. Fix bad bytes/characters one Unicode conversion, - break on bad bytes in case of non-Unicode copying. + Copy a string. Fix bad bytes/characters to '?'. */ uint well_formed_copy(CHARSET_INFO *to_cs, char *to, uint to_length, CHARSET_INFO *from_cs, const char *from, @@ -84,32 +83,6 @@ public: from_cs, from, from_length, from_length /* No limit on "nchars"*/); } - /* - Copy a string. If a bad byte sequence is found in case of non-Unicode - copying, continues processing and replaces bad bytes to '?'. - */ - uint copy_fix(CHARSET_INFO *to_cs, char *to, uint to_length, - CHARSET_INFO *from_cs, const char *from, uint from_length) - { - uint length= well_formed_copy(to_cs, to, to_length, - from_cs, from, from_length, - from_length /* No limit on nchars */); - if (well_formed_error_pos() && source_end_pos() < from + from_length) - { - /* - There was an error and there are still some bytes in the source string. - This is possible if there were no character set conversion and a - malformed byte sequence was found. Copy the rest and replace bad - bytes to '?'. Note: m_source_end_pos is not updated!!! - */ - uint dummy_errors; - length+= copy_and_convert(to + length, to_length - length, to_cs, - source_end_pos(), - from_length - (source_end_pos() - from), - from_cs, &dummy_errors); - } - return length; - } }; |