[Commits] 55eb6fa5dafa18c5e826e6d924a1ffd7eb73b389 Another attempt to fix bug mdev-10785 + cleanup for the previous attempt.

Igor Babaev igor at askmonty.org
Wed Sep 14 21:44:42 EEST 2016


commit 55eb6fa5dafa18c5e826e6d924a1ffd7eb73b389
Author: Igor Babaev <igor at askmonty.org>
Commit: Igor Babaev <igor at askmonty.org>

    Another attempt to fix bug mdev-10785 + cleanup for the previous attempt.
---
 sql/sql_derived.cc |    9 +--------
 sql/sql_lex.cc     |    1 +
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 677a4c4..85a85b9 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -1242,18 +1242,11 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
                          (uchar*) sl);
     if (!extracted_cond_copy)
       continue;
-    /*
-      Create the conjunction of the existing having condition of sl
-      and the pushed condition, take it as the new having condition of sl
-      and fix this new condition
-    */
+
     extracted_cond_copy->walk(&Item::cleanup_processor, 0, 0);
     sl->cond_pushed_into_having= extracted_cond_copy;
   }
   thd->lex->current_select= save_curr_select;
   return false;
-err:
-  thd->lex->current_select= save_curr_select;
-  return true;
 }
 
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 592de98..4d161b3 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4923,6 +4923,7 @@ void binlog_unsafe_map_init()
 
 void st_select_lex::collect_grouping_fields(THD *thd) 
 {
+  grouping_tmp_fields.empty();
   List_iterator<Item> li(join->fields_list);
   Item *item= li++;
   for (uint i= 0; i < master_unit()->derived->table->s->fields; i++, (item=li++))


More information about the commits mailing list