1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.6 into 10.7

This commit is contained in:
Marko Mäkelä
2022-04-26 18:59:40 +03:00
274 changed files with 9352 additions and 8456 deletions

View File

@ -899,8 +899,10 @@ void vers_select_conds_t::print(String *str, enum_query_type query_type) const
end.print(str, query_type, STRING_WITH_LEN(" AND "));
break;
case SYSTEM_TIME_BEFORE:
start.print(str, query_type, STRING_WITH_LEN(" FOR SYSTEM_TIME BEFORE "));
break;
case SYSTEM_TIME_HISTORY:
DBUG_ASSERT(0);
// nothing to add
break;
case SYSTEM_TIME_ALL:
str->append(STRING_WITH_LEN(" FOR SYSTEM_TIME ALL"));
@ -4037,12 +4039,9 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
tab->join= this;
DBUG_ASSERT(tab > tab->join->join_tab || !top_join_tab_count ||
!tables_list);
tab->table= table;
if (tab > join_tab)
(tab - 1)->next_select= sub_select_postjoin_aggr;
if (!(tab->aggr= new (thd->mem_root) AGGR_OP(tab)))
goto err;
tab->table= table;
table->reginfo.join_tab= tab;
/* if group or order on first table, sort first */
if ((group_list && simple_group) ||
@ -4091,12 +4090,15 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
order= NULL;
}
}
if (!(tab->aggr= new (thd->mem_root) AGGR_OP(tab)))
goto err;
table->reginfo.join_tab= tab;
DBUG_RETURN(false);
err:
if (table != NULL)
free_tmp_table(thd, table);
tab->table= NULL;
DBUG_RETURN(true);
}
@ -14282,6 +14284,7 @@ void JOIN::cleanup(bool full)
if (curr_tab->aggr)
{
free_tmp_table(thd, curr_tab->table);
curr_tab->table= NULL;
delete curr_tab->tmp_table_param;
curr_tab->tmp_table_param= NULL;
curr_tab->aggr= NULL;