diff options
author | Igor Babaev <igor@askmonty.org> | 2011-07-20 16:09:28 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-07-20 16:09:28 -0700 |
commit | 57f4965f36b742f5b5abee0b31d20689916c43a8 (patch) | |
tree | 86497f4563ec306b977a5cc35c035bd6ac43b642 /sql/opt_sum.cc | |
parent | 36be492dc00c6aeb1eed4e871c5b10383184f559 (diff) | |
download | mariadb-git-57f4965f36b742f5b5abee0b31d20689916c43a8.tar.gz |
Fixed LP bug #702301.
The function matching_cond should take into account that
there may be always false constant conjunctive conditions
that has not been evaluated yet,for example, conjunctive
conditions with non-correlated subqueries.
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index b55f4b7d7fa..43fbe17a25b 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -623,7 +623,7 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo, if (!(cond->used_tables() & field->table->map)) { /* Condition doesn't restrict the used table */ - DBUG_RETURN(TRUE); + DBUG_RETURN(!cond->const_item()); } if (cond->type() == Item::COND_ITEM) { |