Bug #4315 | GROUP_CONCAT with ORDER BY returns strange results for TEXT fields | ||
---|---|---|---|
Submitted: | 28 Jun 2004 20:07 | Modified: | 10 Oct 2004 8:41 |
Reporter: | Jason Carter | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.4 | OS: | MacOS (Mac OS 10.3.5) |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[28 Jun 2004 20:07]
Jason Carter
[28 Jun 2004 20:12]
Jason Carter
Update: This only applies to queries that use the ORDER BY clause in the GROUP_CONCAT function. For example, the following query works fine. mysql> SELECT id,GROUP_CONCAT(memo) FROM test1 GROUP BY id; +------+---------------------+ | id | GROUP_CONCAT(memo) | +------+---------------------+ | 1000 | From Outer Space | | 2000 | From Bozo the clown | +------+---------------------+ 2 rows in set (0.01 sec)
[28 Jun 2004 21:56]
Dean Ellis
Verified against 4.1.3/Linux, thank you. DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( a int, b TEXT ); INSERT INTO t1 VALUES (1,'First Row'), (2,'Second Row'); SELECT GROUP_CONCAT(b ORDER BY b) FROM t1 GROUP BY a; DROP TABLE t1;
[12 Aug 2004 10:46]
Vasily Kishkin
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: Error was found and fixed. The problem was with values of blobs in internal buffer.
[16 Sep 2004 10:10]
Sergei Golubchik
drop table if exists t1; create table t1 (i int, t text); insert into t1 values (1, "1"); insert into t1 values (1, "22"); insert into t1 values (1, "333"); insert into t1 values (1, "4444"); insert into t1 values (1, "55555"); select group_concat(t order by t) from t1 group by i; +----------------------------+ | group_concat(t order by t) | +----------------------------+ | 5,55,555,5555,55555 | +----------------------------+ 1 row in set (0.00 sec)
[16 Sep 2004 15:48]
Jason Carter
Verified Sergei's example on 4.1.4. This bug persists.
[10 Oct 2004 8:41]
Ramil Kalimullin
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html