From e5f238a05152efbd4b05425511eeed59c3026779 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Tue, 6 Jul 2010 19:16:24 +0400 Subject: Fix buildbot valgrind failure - Item_in_subselect::init_left_expr_cache() should not try to guess whether the left expression is accessed "over the grouping operation" (i.e. the subselect is evaluated after the grouping while the left_expr is an Item_ref that wraps an expression from before the grouping). Instead, let new_Cached_item not to try accessing item->real_item() when creating left expr cache. --- sql/item_buff.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sql/item_buff.cc') 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()) { -- cgit v1.2.1