summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-07-01 07:40:22 -0700
committerunknown <igor@rurik.mysql.com>2005-07-01 07:40:22 -0700
commit607030266f83a3b81cddf40ca05245381600fdf4 (patch)
tree79931c75069efe98c4c291c0446585a599510b72 /sql/sql_select.cc
parent0ff72e6019d8f9deec9159db87cf7947142539b3 (diff)
downloadmariadb-git-607030266f83a3b81cddf40ca05245381600fdf4.tar.gz
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. sql/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. mysql-test/t/olap.test: Added a test case for bug #11543. mysql-test/r/olap.result: Added a test case for bug #11543.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 044dc60e4b6..5866585bb60 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -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