1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.3' into 10.4

This commit is contained in:
Oleksandr Byelkin
2021-07-31 22:59:58 +02:00
339 changed files with 7425 additions and 2358 deletions

View File

@ -1623,7 +1623,12 @@ static int mysql_test_select(Prepared_statement *stmt,
if (!lex->describe && !thd->lex->analyze_stmt && !stmt->is_sql_prepare())
{
/* Make copy of item list, as change_columns may change it */
List<Item> fields(lex->first_select_lex()->item_list);
SELECT_LEX_UNIT* master_unit= unit->first_select()->master_unit();
bool is_union_op=
master_unit->is_unit_op() || master_unit->fake_select_lex;
List<Item> fields(is_union_op ? unit->item_list :
lex->first_select_lex()->item_list);
/* Change columns if a procedure like analyse() */
if (unit->last_procedure && unit->last_procedure->change_columns(thd, fields))
@ -1745,7 +1750,7 @@ static bool mysql_test_call_fields(Prepared_statement *stmt,
while ((item= it++))
{
if (item->fix_fields_if_needed_for_scalar(thd, it.ref()))
if (item->fix_fields_if_needed(thd, it.ref()))
goto err;
}
DBUG_RETURN(FALSE);