diff options
author | bar@mysql.com/bar.myoffice.izhnet.ru <> | 2007-08-03 15:25:23 +0500 |
---|---|---|
committer | bar@mysql.com/bar.myoffice.izhnet.ru <> | 2007-08-03 15:25:23 +0500 |
commit | 4eebfd09c2b045258615bf07990deb6f0f73f729 (patch) | |
tree | 01c0ee2f5244a4d68fc6cdfb6555fa1af4589a8c /sql/sql_string.cc | |
parent | a8b2d9c951376cc230c789ac674cf038c315ed5b (diff) | |
download | mariadb-git-4eebfd09c2b045258615bf07990deb6f0f73f729.tar.gz |
Bug#28875 Conversion between ASCII and LATIN1 charsets does not function
(Regression, caused by a patch for the bug 22646).
Problem: when result type of date_format() was changed from
binary string to character string, mixing date_format()
with a ascii column in CONCAT() stopped to work.
Fix:
- adding "repertoire" flag into DTCollation class,
to mark items which can return only pure ASCII strings.
- allow character set conversion from pure ASCII to other character sets.
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 9d7df73cd7a..a87074c3359 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -263,6 +263,8 @@ bool String::needs_conversion(uint32 arg_length, (to_cs == &my_charset_bin) || (to_cs == from_cs) || my_charset_same(from_cs, to_cs) || + (my_charset_is_ascii_based(to_cs) && + my_charset_is_8bit_pure_ascii(from_cs)) || ((from_cs == &my_charset_bin) && (!(*offset=(arg_length % to_cs->mbminlen))))) return FALSE; |