From: Date: October 10 2005 10:48am Subject: bk commit into 4.1 tree (bar:1.2485) BUG#13233 List-Archive: http://lists.mysql.com/internals/30852 X-Bug: 13233 Message-Id: <200510100848.j9A8mwsR048228@bar.intranet.mysql.r18.ru> Below is the list of changes that have just been committed into a local 4.1 repository of bar. When bar does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2485 05/10/10 13:48:53 bar@stripped +3 -0 Bug#13233: select distinct char(column) fails with utf8 item_strfunc.h: mbcharlen shhould be taken in account when calculating max_length. ctype_utf8.result, ctype_utf8.test: Adding test case. sql/item_strfunc.h 1.97 05/10/10 13:47:55 bar@stripped +1 -1 Bug#13233: select distinct char(column) fails with utf8 Take in account mbcharlen. mysql-test/r/ctype_utf8.result 1.66 05/10/10 13:47:03 bar@stripped +9 -0 Bug#13233: select distinct char(column) fails with utf8 Adding test case. mysql-test/t/ctype_utf8.test 1.68 05/10/10 13:46:48 bar@stripped +9 -0 Bug#13233: select distinct char(column) fails with utf8 Adding test case. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: bar # Host: bar.intranet.mysql.r18.ru # Root: /usr/home/bar/mysql-4.1.b13233 --- 1.96/sql/item_strfunc.h 2005-06-29 14:37:26 +05:00 +++ 1.97/sql/item_strfunc.h 2005-10-10 13:47:55 +05:00 @@ -449,7 +449,7 @@ void fix_length_and_dec() { collation.set(default_charset()); - maybe_null=0; max_length=arg_count; + maybe_null=0; max_length= arg_count * collation.collation->mbmaxlen; } const char *func_name() const { return "char"; } }; --- 1.65/mysql-test/r/ctype_utf8.result 2005-09-21 22:17:30 +05:00 +++ 1.66/mysql-test/r/ctype_utf8.result 2005-10-10 13:47:03 +05:00 @@ -1056,3 +1056,12 @@ 5B E880BD 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; --- 1.67/mysql-test/t/ctype_utf8.test 2005-09-21 22:13:38 +05:00 +++ 1.68/mysql-test/t/ctype_utf8.test 2005-10-10 13:46:48 +05:00 @@ -865,4 +865,13 @@ select hex(a) from t1; 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