From cfc78dae98e70175908c156b644071537176a2b3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Oct 2005 14:41:56 +0500 Subject: Bug#13233 select distinct char(column) fails with utf8 ctype_utf8.result, ctype_utf8.test: Adding test case sql_yacc.yy: Adding new syntax. item_strfunc.h: Fixing wrong max_length calculation. Also, adding CHAR(x USING charset), for easier migrating from 4.1 to 5.0, according to Monty's suggestion. sql/item_strfunc.h: Bug#13233 select distinct char(column) fails with utf8 Also, adding CHAR(x USING charset), for easier migrating from 4.1 to 5.0. sql/sql_yacc.yy: Adding new syntax. mysql-test/t/ctype_utf8.test: Adding test case mysql-test/r/ctype_utf8.result: Adding test case --- mysql-test/r/ctype_utf8.result | 9 +++++++++ mysql-test/t/ctype_utf8.test | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index c7606b918df..03d3ab9f22e 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1061,3 +1061,12 @@ create table t1 (a varchar(255)) default charset=utf8; select * from t1 where find_in_set('-1', a); a drop table t1; +create table t1 (a int); +insert into t1 values (48),(49),(50); +set names utf8; +select distinct char(a) from t1; +char(a) +0 +1 +2 +drop table t1; diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index dcb7469d46e..8c0e03c0cd3 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -873,4 +873,13 @@ create table t1 (a varchar(255)) default charset=utf8; select * from t1 where find_in_set('-1', a); drop table t1; +# +# Bug#13233: select distinct char(column) fails with utf8 +# +create table t1 (a int); +insert into t1 values (48),(49),(50); +set names utf8; +select distinct char(a) from t1; +drop table t1; + # End of 4.1 tests -- cgit v1.2.1