Bug #8656 Crash with group_concat on alias in outer table
Submitted: 21 Feb 2005 17:56 Modified: 17 Mar 2005 16:09
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.10 OS:
Assigned to: Sergei Glukhov CPU Architecture:Any

[21 Feb 2005 17:56] Martin Friebe
Description:
the  last query in how to repeat crashes

How to repeat:
 create table r2 (a int, b int);
 insert into r2 values
(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11);

# this one works
select  b x,  (select group_concat(o.b) from r2    ) from  r2 o ;
+------+----------------------------------------+
| x    | (select group_concat(o.b) from r2    ) |
+------+----------------------------------------+
|    1 | 1,1,1,1,1,1,1,1,1,1,1                  |
|    2 | 2,2,2,2,2,2,2,2,2,2,2                  |
|    3 | 3,3,3,3,3,3,3,3,3,3,3                  |
|    4 | 4,4,4,4,4,4,4,4,4,4,4                  |
|    5 | 5,5,5,5,5,5,5,5,5,5,5                  |
|    6 | 6,6,6,6,6,6,6,6,6,6,6                  |
|    7 | 7,7,7,7,7,7,7,7,7,7,7                  |
|    8 | 8,8,8,8,8,8,8,8,8,8,8                  |
|    9 | 9,9,9,9,9,9,9,9,9,9,9                  |
|   10 | 10,10,10,10,10,10,10,10,10,10,10       |
|   11 | 11,11,11,11,11,11,11,11,11,11,11       |
+------+----------------------------------------+
11 rows in set (0.00 sec)

# using the alias crashes
mysql> select  b x,  (select group_concat(x) from r2    ) from  r2 ;
ERROR 2013 (HY000): Lost connection to MySQL server during query

Suggested fix:
-
[21 Feb 2005 18:17] Martin Friebe
found a simplier one

 select  b x,  (select distinct o.b from r2 ) from  r2 o ;
ERROR 2006 (HY000): MySQL server has gone away
[21 Feb 2005 18:37] Miguel Solorzano
Thank you for the bug report I was able to repeat with BK source tree.
[9 Mar 2005 13:53] 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/22837
[16 Mar 2005 12:42] 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/23085
[17 Mar 2005 6:48] Sergei Glukhov
Fixed in 4.1.11
[17 Mar 2005 16:09] Paul Dubois
Noted in 4.1.11 changelog.