From 4eebfd09c2b045258615bf07990deb6f0f73f729 Mon Sep 17 00:00:00 2001 From: "bar@mysql.com/bar.myoffice.izhnet.ru" <> Date: Fri, 3 Aug 2007 15:25:23 +0500 Subject: 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. --- mysql-test/r/func_time.result | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test/r/func_time.result') diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 56ea72a8ee3..2207cd27243 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1246,3 +1246,19 @@ SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SE TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") 838:59:58 838:59:59 +set names latin1; +create table t1 (a varchar(15) character set ascii not null); +insert into t1 values ('070514-000000'); +select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1; +concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) +# +set names swe7; +select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1; +ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (swe7_swedish_ci,COERCIBLE) for operation 'concat' +set names latin1; +set lc_time_names=fr_FR; +select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1; +ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'concat' +set lc_time_names=en_US; +drop table t1; +End of 5.0 tests -- cgit v1.2.1