diff options
Diffstat (limited to 'sql/item_buff.cc')
-rw-r--r-- | sql/item_buff.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/item_buff.cc b/sql/item_buff.cc index 037a988ebbc..13183a33e59 100644 --- a/sql/item_buff.cc +++ b/sql/item_buff.cc @@ -27,14 +27,13 @@ Create right type of Cached_item for an item. */ -Cached_item *new_Cached_item(THD *thd, Item *item, bool use_result_field) +Cached_item *new_Cached_item(THD *thd, Item *item, bool pass_through_ref) { - if (item->real_item()->type() == Item::FIELD_ITEM && + if (pass_through_ref && item->real_item()->type() == Item::FIELD_ITEM && !(((Item_field *) (item->real_item()))->field->flags & BLOB_FLAG)) { Item_field *real_item= (Item_field *) item->real_item(); - Field *cached_field= use_result_field ? real_item->result_field : - real_item->field; + Field *cached_field= real_item->field; return new Cached_item_field(cached_field); } switch (item->result_type()) { |