mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
olap.result, olap.test:
Added a test case for bug #11543. sql_select.cc: Fixed bug #11543. A ROLLUP query could return a wrong result set when its GROUP BY clause contained references to the same column.
This commit is contained in:
@ -9322,7 +9322,7 @@ bool JOIN::rollup_init()
|
||||
ORDER *group_tmp;
|
||||
for (group_tmp= group_list; group_tmp; group_tmp= group_tmp->next)
|
||||
{
|
||||
if (item->eq(*group_tmp->item,0))
|
||||
if (*group_tmp->item == item)
|
||||
item->maybe_null= 1;
|
||||
}
|
||||
if (item->type() == Item::FUNC_ITEM)
|
||||
@ -9444,7 +9444,7 @@ bool JOIN::rollup_make_fields(List<Item> &fields_arg, List<Item> &sel_fields,
|
||||
for (group_tmp= start_group, i= pos ;
|
||||
group_tmp ; group_tmp= group_tmp->next, i++)
|
||||
{
|
||||
if (item->eq(*group_tmp->item,0))
|
||||
if (*group_tmp->item == item)
|
||||
{
|
||||
/*
|
||||
This is an element that is used by the GROUP BY and should be
|
||||
|
Reference in New Issue
Block a user