1
0
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:
igor@rurik.mysql.com
2005-07-01 07:40:22 -07:00
parent 15d4217c58
commit 343e8effa9
3 changed files with 25 additions and 2 deletions

View File

@ -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