mirror of
https://github.com/MariaDB/server.git
synced 2025-11-15 09:02:33 +03:00
improved bug fix
sql/sql_select.cc: somewhat improved bug fix
This commit is contained in:
@@ -555,10 +555,18 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
|
|||||||
/* Change DISTINCT to GROUP BY */
|
/* Change DISTINCT to GROUP BY */
|
||||||
select_distinct= 0;
|
select_distinct= 0;
|
||||||
no_order= !order;
|
no_order= !order;
|
||||||
if (order && skip_sort_order)
|
|
||||||
join.tmp_table_param.quick_group=0;
|
|
||||||
if (all_order_fields_used)
|
if (all_order_fields_used)
|
||||||
|
{
|
||||||
|
if (order && skip_sort_order)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Force MySQL to read the table in sorted order to get result in
|
||||||
|
ORDER BY order.
|
||||||
|
*/
|
||||||
|
join.tmp_table_param.quick_group=0;
|
||||||
|
}
|
||||||
order=0;
|
order=0;
|
||||||
|
}
|
||||||
join.group=1; // For end_write_group
|
join.group=1; // For end_write_group
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user