1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge mysql.com:/home/kgeorge/mysql/5.0/B18068

into  mysql.com:/home/kgeorge/mysql/5.1/B18068
This commit is contained in:
gkodinov@mysql.com
2006-05-09 18:47:29 +03:00
5 changed files with 77 additions and 0 deletions

View File

@@ -12803,6 +12803,17 @@ create_distinct_group(THD *thd, Item **ref_pointer_array,
{
if (!item->const_item() && !item->with_sum_func && !item->marker)
{
/*
Don't put duplicate columns from the SELECT list into the
GROUP BY list.
*/
ORDER *ord_iter;
for (ord_iter= group; ord_iter; ord_iter= ord_iter->next)
if ((*ord_iter->item)->eq(item, 1))
break;
if (ord_iter)
continue;
ORDER *ord=(ORDER*) thd->calloc(sizeof(ORDER));
if (!ord)
return 0;