Bug #12829 Cannot convert the charset of a GROUP_CONCAT result
Submitted: 26 Aug 2005 11:05 Modified: 8 Sep 2005 20:29
Reporter: Hervé Guillemet Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.14 OS:Linux (Linux)
Assigned to: Alexander Barkov CPU Architecture:Any

[26 Aug 2005 11:05] Hervé Guillemet
Description:
After change the character set undestood by the client with SET CHARACTER SET,
GROUP_CONCAT results are not converted.

How to repeat:
<pre>
CREATE TEMPORARY TABLE tmp (t CHAR(10));
INSERT INTO tmp VALUES ('éé');

SET CHARACTER SET 'utf8';
SELECT t FROM tmp;
+------+
| t    |
+------+
| éé |
+------+

SELECT GROUP_CONCAT(t) FROM tmp;
+-----------------+
| group_concat(t) |
+-----------------+
| éé              |
+-----------------+

</pre>
[26 Aug 2005 19:14] Miguel Solorzano
mysql> CREATE TABLE tmp (t CHAR(10));
Query OK, 0 rows affected (0.04 sec)

mysql> INSERT INTO tmp VALUES ('éé');
Query OK, 1 row affected (0.00 sec)

mysql> SELECT t FROM tmp;
+------+
| t    |
+------+
| éé   |
+------+
1 row in set (0.01 sec)

mysql> SET CHARACTER SET 'utf8';
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT t FROM tmp;
+------+
| t    |
+------+
| éé |
+------+
1 row in set (0.00 sec)

mysql> SELECT GROUP_CONCAT(t) FROM tmp;
+-----------------+
| GROUP_CONCAT(t) |
+-----------------+
| éé              |
+-----------------+
1 row in set (0.00 sec)

mysql> SELECT t FROM tmp;
+------+
| t    |
+------+
| éé |
+------+
1 row in set (0.00 sec)

mysql> select version();
+------------------+
| version()        |
+------------------+
| 4.1.15-debug-log |
+------------------+
1 row in set (0.00 sec)
[30 Aug 2005 10:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/29025
[7 Sep 2005 11:27] Alexander Barkov
Pushed into 4.1.15 and 5.0.13
[8 Sep 2005 20:29] Paul Dubois
Noted in 4.1.15, 5.0.13 changelogs.