mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 10:15:29 +02:00
MDEV-17796 WHERE filter is ignored by DISTINCT IFNULL(GROUP_CONCAT(X), Y)
with GROUP BY + ORDER BY The method JOIN::create_postjoin_aggr_table() should not call call JOIN::add_sorting_to_table() unless the first non-constant join table is passed as the first parameter to the method.
This commit is contained in:
parent
6b5d3c51b3
commit
5fc8dd8b82
3 changed files with 29 additions and 1 deletions
|
|
@ -3007,7 +3007,8 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
|
|||
if (setup_sum_funcs(thd, sum_funcs))
|
||||
goto err;
|
||||
|
||||
if (!group_list && !table->distinct && order && simple_order)
|
||||
if (!group_list && !table->distinct && order && simple_order &&
|
||||
tab == join_tab + const_tables)
|
||||
{
|
||||
DBUG_PRINT("info",("Sorting for order"));
|
||||
THD_STAGE_INFO(thd, stage_sorting_for_order);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue