| Bug #37401 | One Item_sum constructor does not initialize quick_group. All others do. | ||
|---|---|---|---|
| Submitted: | 13 Jun 2008 18:43 | Modified: | 30 Oct 2019 22:07 |
| Reporter: | Mark Callaghan | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.0.54,5.1.24, 5.0, 5.1, 6.0 bzr | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Constructor, Item_sum | ||
[10 Jul 2008 21:13]
Sveta Smirnova
Thank you for the report. Verified as described.
[30 Oct 2019 22:07]
Roy Lyseng
Posted by developer: quick_group is not a member of this class in latest MySQL sources.

Description: This constructor does not set quick_group. The other Item_constructors do. This makes things confusing for classes derived from Item_sum. Item_sum::Item_sum(List<Item> &list) :arg_count(list.elements), forced_const(FALSE) { if ((args=(Item**) sql_alloc(sizeof(Item*)*arg_count))) { uint i=0; List_iterator_fast<Item> li(list); Item *item; while ((item=li++)) { args[i++]= item; } } mark_as_sum_func(); list.empty(); // Fields are used } How to repeat: Review the code Suggested fix: Set quick_group in this constructor.