mirror of
https://github.com/MariaDB/server.git
synced 2025-07-11 15:22:09 +03:00
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/work/20503-bug-5.0-mysql
This commit is contained in:
@ -13513,7 +13513,19 @@ bool JOIN::alloc_func_list()
|
||||
disctinct->group_by optimization
|
||||
*/
|
||||
if (select_distinct)
|
||||
{
|
||||
group_parts+= fields_list.elements;
|
||||
/*
|
||||
If the ORDER clause is specified then it's possible that
|
||||
it also will be optimized, so reserve space for it too
|
||||
*/
|
||||
if (order)
|
||||
{
|
||||
ORDER *ord;
|
||||
for (ord= order; ord; ord= ord->next)
|
||||
group_parts++;
|
||||
}
|
||||
}
|
||||
|
||||
/* This must use calloc() as rollup_make_fields depends on this */
|
||||
sum_funcs= (Item_sum**) thd->calloc(sizeof(Item_sum**) * (func_count+1) +
|
||||
|
Reference in New Issue
Block a user