diff options
author | Igor Babaev <igor@askmonty.org> | 2010-10-14 14:47:38 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2010-10-14 14:47:38 -0700 |
commit | f0c6576b85a57ec82fd911f73cce7c99683b378c (patch) | |
tree | 44a435e91b13dfb2633aea3023859368b2d1cd5a /sql/sql_select.cc | |
parent | 01672cc026a60d434dc8276908517c9d4fed131d (diff) | |
download | mariadb-git-f0c6576b85a57ec82fd911f73cce7c99683b378c.tar.gz |
Reverted the MySQL fix for bug 51242 that was rejected once for mariadb-5.1.48
and mistakingly pulled in back for maria-5.1.50.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 5471b35e250..619d847ed90 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1129,29 +1129,6 @@ JOIN::optimize() conds=new Item_int((longlong) 0,1); // Always false } - /* - It's necessary to check const part of HAVING cond as there is a - chance that some cond parts may become const items after - make_join_statistics() (for example when Item is a reference to - cost table field from outer join). - - This check is performed only for those conditions which do not use - aggregate functions. In such case temporary table may not be used - and const condition elements may be lost during further having - condition transformation in JOIN::exec. - */ - if (having && const_table_map && !having->with_sum_func) - { - having->update_used_tables(); - having= remove_eq_conds(thd, having, &having_value); - if (having_value == Item::COND_FALSE) - { - having= new Item_int((longlong) 0,1); - zero_result_cause= "Impossible HAVING noticed after reading const tables"; - DBUG_RETURN(0); - } - } - if (make_join_select(this, select, conds)) { zero_result_cause= |