summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_time.test
diff options
context:
space:
mode:
authorunknown <bar@bar.myoffice.izhnet.ru>2007-08-03 17:16:02 +0500
committerunknown <bar@bar.myoffice.izhnet.ru>2007-08-03 17:16:02 +0500
commitbcee450118621635b8c0b5e817e14ca36b654139 (patch)
tree35a4ca131042aba598547cd40d5d5926942e3068 /mysql-test/t/func_time.test
parent6df75c85fdc68afc24fa8dea876062dc174b887e (diff)
parent53df09a9a6a99b82e2a8869eb16737a78772b29e (diff)
downloadmariadb-git-bcee450118621635b8c0b5e817e14ca36b654139.tar.gz
Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28875
into mysql.com:/home/bar/mysql-work/mysql-5.1.b28875 mysql-test/r/ctype_utf8.result: Auto merged mysql-test/t/ctype_utf8.test: Auto merged mysys/charset.c: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/sql_string.cc: Auto merged strings/conf_to_src.c: Auto merged strings/ctype-extra.c: Auto merged strings/ctype.c: Auto merged include/m_ctype.h: After merge fix mysql-test/r/ctype_ucs.result: After merge fix mysql-test/r/func_time.result: After merge fix mysql-test/t/ctype_ucs.test: After merge fix mysql-test/t/func_time.test: After merge fix sql/sql_lex.cc: After merge fix sql/sql_lex.h: After merge fix sql/sql_yacc.yy: After merge fix
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r--mysql-test/t/func_time.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 95ffa110346..d3346bbb880 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -731,6 +731,31 @@ DROP TABLE t1;
# Check if using GROUP BY with TIME_FORMAT() produces correct results
SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SELECT 3020398 ) x GROUP BY 1;
+
+#
+# Bug#28875 Conversion between ASCII and LATIN1 charsets does not function
+#
+set names latin1;
+create table t1 (a varchar(15) character set ascii not null);
+insert into t1 values ('070514-000000');
+# Conversion of date_format() result to ASCII
+# is safe with the default locale en_US
+--replace_column 1 #
+select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
+# Error for swe7: it is not ASCII compatible
+set names swe7;
+--error 1267
+select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
+set names latin1;
+# Conversion of date_format() result to ASCII
+# is not safe with the non-default locale fr_FR
+# because month and day names can have accented characters
+set lc_time_names=fr_FR;
+--error 1267
+select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
+set lc_time_names=en_US;
+drop table t1;
+
--echo End of 5.0 tests
#