mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed LP bug #793386.
Auto-generated names for view field items must be allocated in the statement memory, not in the execution memory of the statement.
This commit is contained in:
@ -5861,10 +5861,15 @@ 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)
|
||||
thd->change_item_tree(ref, item);
|
||||
|
Reference in New Issue
Block a user