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_subselect.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_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index a20cc146531..0d0acdb29e4 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -2192,8 +2192,6 @@ bool Item_in_subselect::setup_engine() bool Item_in_subselect::init_left_expr_cache() { JOIN *outer_join; - Next_select_func end_select; - bool use_result_field= FALSE; outer_join= unit->outer_select()->join; /* @@ -2202,18 +2200,6 @@ bool Item_in_subselect::init_left_expr_cache() */ if (!outer_join || !outer_join->tables || !outer_join->tables_list) return TRUE; - /* - If we use end_[send | write]_group to handle complete rows of the outer - query, make the cache of the left IN operand use Item_field::result_field - instead of Item_field::field. We need this because normally - Cached_item_field uses Item::field to fetch field data, while - copy_ref_key() that copies the left IN operand into a lookup key uses - Item::result_field. In the case end_[send | write]_group result_field is - one row behind field. - */ - end_select= outer_join->join_tab[outer_join->tables-1].next_select; - if (end_select == end_send_group || end_select == end_write_group) - use_result_field= TRUE; if (!(left_expr_cache= new List<Cached_item>)) return TRUE; @@ -2222,7 +2208,7 @@ bool Item_in_subselect::init_left_expr_cache() { Cached_item *cur_item_cache= new_Cached_item(thd, left_expr->element_index(i), - use_result_field); + FALSE); if (!cur_item_cache || left_expr_cache->push_front(cur_item_cache)) return TRUE; } |