mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed bug mdev-9028.
This patch is actually a complement for the fix of bug mdev-6892. The procedure create_tmp_table() now must take into account Item_direct_refs that wrap up constant fields of derived tables/views that are used as inner tables in outer join operations.
This commit is contained in:
@ -14627,7 +14627,9 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
|
||||
if (new_field)
|
||||
new_field->init(table);
|
||||
|
||||
if (copy_func && item->real_item()->is_result_field())
|
||||
if (copy_func &&
|
||||
(item->is_result_field() ||
|
||||
(item->real_item()->is_result_field())))
|
||||
*((*copy_func)++) = item; // Save for copy_funcs
|
||||
if (modify_item)
|
||||
item->set_result_field(new_field);
|
||||
|
Reference in New Issue
Block a user