diff options
author | Georgi Kodinov <georgi.kodinov@oracle.com> | 2014-04-11 10:42:30 +0300 |
---|---|---|
committer | Georgi Kodinov <georgi.kodinov@oracle.com> | 2014-04-11 10:42:30 +0300 |
commit | ea38c2658229c45e48bf417168efc85f4768cef4 (patch) | |
tree | fd289966aa6573f250a93a12d5bb52394bce5baa /sql/sql_string.cc | |
parent | 37b9a31a3095dd8f4a15b957f1c4b28fe4fab4ed (diff) | |
download | mariadb-git-ea38c2658229c45e48bf417168efc85f4768cef4.tar.gz |
Addendum #1 to the fix for bug #18359924
Removed unused variable.
Fixed long (>80 lines)
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index b9a9ce92cd6..41725128415 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -241,11 +241,17 @@ bool String::needs_conversion_on_storage(uint32 arg_length, { uint32 offset; return (needs_conversion(arg_length, cs_from, cs_to, &offset) || - (cs_from == &my_charset_bin && /* force conversion when storing a binary string */ - cs_to != &my_charset_bin && /* into a non-binary destination */ - ( /* and any of the following is true :*/ - cs_to->mbminlen != cs_to->mbmaxlen || /* it's a variable length encoding */ - cs_to->mbminlen > 2 || /* longer than 2 bytes : neither 1 byte nor ucs2 */ + /* force conversion when storing a binary string */ + (cs_from == &my_charset_bin && + /* into a non-binary destination */ + cs_to != &my_charset_bin && + /* and any of the following is true :*/ + ( + /* it's a variable length encoding */ + cs_to->mbminlen != cs_to->mbmaxlen || + /* longer than 2 bytes : neither 1 byte nor ucs2 */ + cs_to->mbminlen > 2 || + /* and is not a multiple of the char byte size */ 0 != (arg_length % cs_to->mbmaxlen) ) ) |