Bug #32482 | crash with GROUP BY alias_of_user_variable WITH ROLLUP | ||
---|---|---|---|
Submitted: | 18 Nov 2007 17:45 | Modified: | 14 Jan 2008 19:09 |
Reporter: | Takashi Ichii | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 5.1.22-rc-log | OS: | Linux |
Assigned to: | Evgeny Potemkin | CPU Architecture: | Any |
Tags: | Contribution, got signal 11, user variable, with rollup |
[18 Nov 2007 17:45]
Takashi Ichii
[19 Nov 2007 7:40]
Sveta Smirnova
Thank you for the report. Verified as described.
[22 Nov 2007 9:52]
Sergei Golubchik
the patch: http://lists.mysql.com/internals/35177
[7 Dec 2007 14:34]
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/39532 ChangeSet@1.2671, 2007-12-07 16:28:44+03:00, evgen@moonbone.local +3 -0 Bug#32482: Unchecked NULL caused server crash. The Item_func_set_user_var::register_field_in_read_map() wasn't checking the result_filed to being null. This led to a server crash on queries which has ordering by such field and which don't employ temporary table. The Item_func_set_user_var::register_field_in_read_map() now checks the result_field to be not null.
[7 Dec 2007 21:00]
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/39573 ChangeSet@1.2671, 2007-12-07 22:54:47+03:00, evgen@moonbone.local +3 -0 Bug#32482: Crash for a query with ORDER BY a user variable. The Item_func_set_user_var::register_field_in_read_map() did not check that the result_field was null.This caused server crashes for queries that required order by such a field and were executed without using a temporary table. The Item_func_set_user_var::register_field_in_read_map() now checks the result_field to be not null.
[14 Dec 2007 8:17]
Bugs System
Pushed into 5.1.23-rc
[14 Dec 2007 8:20]
Bugs System
Pushed into 6.0.5-alpha
[14 Jan 2008 19:09]
Jon Stephens
Documented bugfix in the 5.1.23 and 6.0.5 changelogs as follows: A query of the form SELECT @user_variable := constant AS alias FROM table GROUP BY alias WITH ROLLUP crashed the server.