Commit 76e2be8e authored by unknown's avatar unknown

Bugfix for lounchpad bug#608834 (608824, 609045, 609052).

Added get_tmp_table_item() to cache wrapper as it has all not simple Items (Item_func, Item_field, Item_subquery).

mysql-test/r/subquery_cache.result:
  Tests for bugs fixed.
mysql-test/t/subquery_cache.test:
  Tests for bugs fixed.
sql/item.cc:
  Added get_tmp_table_item() to cache wrapper as it has all not simple Items (Item_func, Item_field, Item_subquery).
sql/item.h:
  Added get_tmp_table_item() to cache wrapper as it has all not simple Items (Item_func, Item_field, Item_subquery).
parent e75fd931
This diff is collapsed.
This diff is collapsed.
......@@ -6966,6 +6966,14 @@ int Item_cache_wrapper::save_in_field(Field *to, bool no_conversions)
}
Item* Item_cache_wrapper::get_tmp_table_item(THD *thd_arg)
{
if (!orig_item->with_sum_func && !orig_item->const_item())
return new Item_field(result_field);
return copy_or_same(thd_arg);
}
/**
Prepare referenced field then call usual Item_direct_ref::fix_fields .
......
......@@ -2624,6 +2624,7 @@ public:
{
save_val(result_field);
}
Item* get_tmp_table_item(THD *thd_arg);
/* Following methods make this item transparent as much as possible */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment