Bug #9635 select/round/group by query crashes server
Submitted: 5 Apr 2005 5:34 Modified: 5 Apr 2005 5:39
Reporter: scott fagg Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.3 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[5 Apr 2005 5:34] scott fagg
Description:
This query will crashed the mysql server :

select round(a/1) from X group by round(a/1);

Depending on the way in which the server i started ( /sbin/service VS safe_mysqld) , it may be restarted. Crash occurs for MyISAM tables and InnoDB tables. It's possible to work around using sub-selects. Running MySQL 5.0.3 from binary RPMs from mysql.com, on top of Fedora Core 2.

How to repeat:
create table X (a int(4) , b int(4)) ;

insert into X ( a , b ) values ( 1, 2 ) , ( 2, 3 ) ;

select round(a/1) from X group by round(a/1);
[5 Apr 2005 5:39] MySQL Verification Team
I wasn't able to repeat with current BK source:

mysql> select round(a/1) from X group by round(a/1);
+------------+
| round(a/1) |
+------------+
| 1          |
| 2          |
+------------+
2 rows in set (0.02 sec)

mysql> select version();
+------------------+
| version()        |
+------------------+
| 5.0.4-beta-debug |
+------------------+
1 row in set (0.00 sec)
[5 Apr 2005 8:34] scott fagg
Also happens using 5.0.3 running on FC3. I'll wait for 5.0.4 to come out ..
[14 Apr 2005 23:49] scott fagg
Just tried 5.0.5 and the crash does not occur. This can be closed as far i'm concerned.