mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
merge
This commit is contained in:
@ -6162,15 +6162,22 @@ find_field_in_view(THD *thd, TABLE_LIST *table_list,
|
||||
*/
|
||||
if (*ref && !(*ref)->is_autogenerated_name)
|
||||
{
|
||||
if (register_tree_change &&
|
||||
thd->stmt_arena->is_stmt_prepare_or_first_stmt_execute())
|
||||
arena= thd->activate_stmt_arena_if_needed(&backup);
|
||||
item->set_name((*ref)->name, (*ref)->name_length,
|
||||
system_charset_info);
|
||||
item->real_item()->set_name((*ref)->name, (*ref)->name_length,
|
||||
system_charset_info);
|
||||
if (arena)
|
||||
thd->restore_active_arena(arena, &backup);
|
||||
if (register_tree_change)
|
||||
{
|
||||
item->set_name_for_rollback(thd, (*ref)->name,
|
||||
(*ref)->name_length,
|
||||
system_charset_info);
|
||||
item->real_item()->set_name_for_rollback(thd, (*ref)->name,
|
||||
(*ref)->name_length,
|
||||
system_charset_info);
|
||||
}
|
||||
else
|
||||
{
|
||||
item->set_name((*ref)->name, (*ref)->name_length,
|
||||
system_charset_info);
|
||||
item->real_item()->set_name((*ref)->name, (*ref)->name_length,
|
||||
system_charset_info);
|
||||
}
|
||||
}
|
||||
if (register_tree_change)
|
||||
thd->change_item_tree(ref, item);
|
||||
@ -7452,6 +7459,14 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2,
|
||||
*/
|
||||
result= FALSE;
|
||||
|
||||
/*
|
||||
Save the lists made during natural join matching (because
|
||||
the matching done only once but we need the list in case
|
||||
of prepared statements).
|
||||
*/
|
||||
table_ref_1->persistent_used_items= table_ref_1->used_items;
|
||||
table_ref_2->persistent_used_items= table_ref_2->used_items;
|
||||
|
||||
err:
|
||||
if (arena)
|
||||
thd->restore_active_arena(arena, &backup);
|
||||
|
Reference in New Issue
Block a user