diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-07-06 19:16:24 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-07-06 19:16:24 +0400 |
commit | e5f238a05152efbd4b05425511eeed59c3026779 (patch) | |
tree | 805c5aa19bef318c36f36012b31219aa4c0d50f3 /sql/item_buff.cc | |
parent | 0d734037ccabdb612e358db3fc91c7aaebf1c5ea (diff) | |
download | mariadb-git-e5f238a05152efbd4b05425511eeed59c3026779.tar.gz |
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.
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()) { |