-
evgen@moonbone.local authored
while space allocation Under some circumstances DISTINCT clause can be converted to grouping. In such cases grouping is performed by all items in the select list. If an ORDER clause is present then items from it is prepended to group list. But the case with ORDER wasn't taken into account when allocating the array for sum functions. This leads to memory corruption and crash. The JOIN::alloc_func_list() function now allocates additional space if there is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is possible.
e0461067