1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

view.result:

Fixed the results of a test for group_concat.
  After the fix foor bug #11639 the results became
  correct.
olap.result, olap.test:
  Added a test case for bug #11639.
sql_select.cc:
  Fixed bug #11639: a wrong result set when using a view
  instead of the underlying table in a rollup query 
  executed through filesort.
  The old code did not take into account that we always
  use an Item_ref object when referring to a view column.
item.h:
  Fixed bug #11639.
  Now if two Item_ref items ref1 and ref2 refer to the same field
  then ref1->eq(ref2) returns 1.
This commit is contained in:
igor@rurik.mysql.com
2005-07-01 03:46:08 -07:00
parent ba2a0328d1
commit 347687f71e
5 changed files with 47 additions and 5 deletions

View File

@ -12150,7 +12150,7 @@ count_field_types(TMP_TABLE_PARAM *param, List<Item> &fields,
param->quick_group=1;
while ((field=li++))
{
Item::Type type=field->type();
Item::Type type=field->real_item()->type();
if (type == Item::FIELD_ITEM)
param->field_count++;
else if (type == Item::SUM_FUNC_ITEM)
@ -12164,7 +12164,7 @@ count_field_types(TMP_TABLE_PARAM *param, List<Item> &fields,
for (uint i=0 ; i < sum_item->arg_count ; i++)
{
if (sum_item->args[0]->type() == Item::FIELD_ITEM)
if (sum_item->args[0]->real_item()->type() == Item::FIELD_ITEM)
param->field_count++;
else
param->func_count++;
@ -12411,9 +12411,10 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
param->copy_funcs.empty();
for (i= 0; (pos= li++); i++)
{
if (pos->type() == Item::FIELD_ITEM)
if (pos->real_item()->type() == Item::FIELD_ITEM)
{
Item_field *item;
pos= pos->real_item();
if (!(item= new Item_field(thd, ((Item_field*) pos))))
goto err;
pos= item;