Bug #25256 Bug #22138 (Server crash on complex select) isn't fixed
Submitted: 23 Dec 2006 14:39 Modified: 9 Jan 2007 19:00
Reporter: Dave Pullin (Basic Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.27-community-nt-log OS:Windows (Windows 2000, XP SP2)
Assigned to: Evgeny Potemkin CPU Architecture:Any

[23 Dec 2006 14:39] Dave Pullin
Description:
Bug #22138 was reduced to a simpler example, and that example was fixed in 5.0.27

BUT the original example of the crash still crashes 5.0.27

Console Log
mysql> select version();
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: coldlogic

+-------------------------+
| version()               |
+-------------------------+
| 5.0.27-community-nt-log |
+-------------------------+
1 row in set (0.20 sec)

mysql> select
    ->  week(date)/10 as week, group_concat(distinct t)
    -> from (
    -> select
    ->  from_days(s) as date,t
    ->  from (select 1 as s,'t' as t union select null, null ) as sub1
    -> ) as sub2
    ->  group by week(date)/10;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>

How to repeat:
select 
 week(date)/10 as week, group_concat(distinct t) 
from (
select 
 from_days(s) as date,t
 from (select 1 as s,'t' as t union select null, null ) as sub1
) as sub2
 group by week(date)/10
[25 Dec 2006 13:43] Valeriy Kravchuk
Thank you for a problem report. I was not able to repeat the behaviour described with current 5.0.34-BK on Linux:

mysql> select
    ->  week(date)/10 as week, group_concat(distinct t)
    -> from (
    -> select
    ->  from_days(s) as date,t
    ->  from (select 1 as s,'t' as t union select null, null ) as sub1
    -> ) as sub2
    ->  group by week(date)/10;
+------+--------------------------+
| week | group_concat(distinct t) |
+------+--------------------------+
| NULL | t                        |
+------+--------------------------+
1 row in set, 3 warnings (0.02 sec)

mysql> select version();
+--------------+
| version()    |
+--------------+
| 5.0.34-debug |
+--------------+
1 row in set (0.00 sec)

But we still have server crash with 5.0.27-nt on XP.
[9 Jan 2007 19:00] Evgeny Potemkin
tested on 5.0.32-debug, Win XP SP2, built with VS 8.0
[9 Jan 2007 19:02] Evgeny Potemkin
tested on 5.0.32-debug, Win XP SP2, built with VS 8.0