Bug #31095 | server crashes with group by null with rollup | ||
---|---|---|---|
Submitted: | 19 Sep 2007 12:22 | Modified: | 9 Nov 2007 0:24 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S1 (Critical) |
Version: | 5.0.48, 5.1.23BK | OS: | Any |
Assigned to: | Evgeny Potemkin | CPU Architecture: | Any |
Tags: | crash, rollup |
[19 Sep 2007 12:22]
Shane Bester
[19 Sep 2007 12:23]
MySQL Verification Team
testcase that crashes: drop table if exists t1; create table t1(a int primary key)engine=myisam; insert into t1 values (1),(2),(3),(4),(5),(6); select a,count(a) from t1 group by null with rollup;
[28 Sep 2007 20:27]
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/commits/34663 ChangeSet@1.2539, 2007-09-29 00:22:54+00:00, evgen@moonbone.local +3 -0 Bug#31095: Unexpected NULL constant caused server crash. The Item_func_rollup_const class is used for wrapping constants to avoid wrong result for ROLLUP queries with DISTINCT and a constant in the select list. This class is also used to wrap up a NULL constant but its null_value wasn't set accordingly. This led to a server crash. Now the null_value of an object of the Item_func_rollup_const class is set by the JOIN::rollup_init function when the object is used to wrap a NULL constant.
[1 Oct 2007 16:09]
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/commits/34725 ChangeSet@1.2539, 2007-10-01 20:03:50+00:00, evgen@moonbone.local +3 -0 Bug#31095: Unexpected NULL constant caused server crash. The Item_func_rollup_const class is used for wrapping constants to avoid wrong result for ROLLUP queries with DISTINCT and a constant in the select list. This class is also used to wrap up a NULL constant but its null_value wasn't set accordingly. This led to a server crash. Now the null_value of an object of the Item_func_rollup_const class is set by its fix_length_and_dec member function.
[29 Oct 2007 8:43]
Bugs System
Pushed into 5.0.52
[29 Oct 2007 8:46]
Bugs System
Pushed into 5.1.23-beta
[29 Oct 2007 8:49]
Bugs System
Pushed into 6.0.4-alpha
[9 Nov 2007 0:24]
Paul DuBois
Noted in 5.0.52, 5.1.23, 6.0.4 changelogs. GROUP BY NULL WITH ROLLUP could cause a server crash.