1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge branch '10.4' into 10.5

This commit is contained in:
Dmitry Shulga
2023-09-05 12:41:49 +07:00
9 changed files with 210 additions and 22 deletions

View File

@ -735,8 +735,7 @@ setup_without_group(THD *thd, Ref_ptr_array ref_pointer_array,
ORDER *group,
List<Window_spec> &win_specs,
List<Item_window_func> &win_funcs,
bool *hidden_group_fields,
uint *reserved)
bool *hidden_group_fields)
{
int res;
enum_parsing_place save_place;
@ -751,13 +750,6 @@ setup_without_group(THD *thd, Ref_ptr_array ref_pointer_array,
thd->lex->allow_sum_func.clear_bit(select->nest_level);
res= setup_conds(thd, tables, leaves, conds);
if (thd->lex->current_select->first_cond_optimization)
{
if (!res && *conds && ! thd->lex->current_select->merged_into)
(*reserved)= (*conds)->exists2in_reserved_items();
else
(*reserved)= 0;
}
/* it's not wrong to have non-aggregated columns in a WHERE */
select->set_non_agg_field_used(saved_non_agg_field_used);
@ -1324,6 +1316,15 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num,
DBUG_ASSERT(select_lex->hidden_bit_fields == 0);
if (setup_wild(thd, tables_list, fields_list, &all_fields, select_lex, false))
DBUG_RETURN(-1);
if (thd->lex->current_select->first_cond_optimization)
{
if ( conds && ! thd->lex->current_select->merged_into)
select_lex->select_n_reserved= conds->exists2in_reserved_items();
else
select_lex->select_n_reserved= 0;
}
if (select_lex->setup_ref_array(thd, real_og_num))
DBUG_RETURN(-1);
@ -1342,8 +1343,7 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num,
all_fields, &conds, order, group_list,
select_lex->window_specs,
select_lex->window_funcs,
&hidden_group_fields,
&select_lex->select_n_reserved))
&hidden_group_fields))
DBUG_RETURN(-1);
/*