mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
group_by.result, group_by.test:
Added a test case for bug #8614. sql_select.cc: Fixed bug #8614. SELECT DISTINCT ... GROUP BY 'const' must be equivalent to SELECT ... GROUP BY 'const'. sql/sql_select.cc: Fixed bug #8614. SELECT DISTINCT ... GROUP BY 'const' must be equivalent to SELECT ... GROUP BY 'const'. mysql-test/t/group_by.test: Added a test case for bug #8614. mysql-test/r/group_by.result: Added a test case for bug #8614.
This commit is contained in:
@ -676,9 +676,14 @@ JOIN::optimize()
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
simple_group= 0;
|
||||
group_list= remove_const(this, group_list, conds,
|
||||
rollup.state == ROLLUP::STATE_NONE,
|
||||
&simple_group);
|
||||
{
|
||||
ORDER *old_group_list;
|
||||
group_list= remove_const(this, (old_group_list= group_list), conds,
|
||||
rollup.state == ROLLUP::STATE_NONE,
|
||||
&simple_group);
|
||||
if (old_group_list && !group_list)
|
||||
select_distinct= 0;
|
||||
}
|
||||
if (!group_list && group)
|
||||
{
|
||||
order=0; // The output has only one row
|
||||
|
Reference in New Issue
Block a user