diff options
author | unknown <igor@rurik.mysql.com> | 2006-05-06 23:48:13 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-05-06 23:48:13 -0700 |
commit | 375749b8afd8b7f47a0b717d0546ad1b2a8f05eb (patch) | |
tree | c0395e36606a03a1a826b85cd00bc0c1484e9314 /SSL | |
parent | 427bcfb440d76124539222f70b4787e8737e2100 (diff) | |
download | mariadb-git-375749b8afd8b7f47a0b717d0546ad1b2a8f05eb.tar.gz |
Fixed bug #14927.
A query with a group by and having clauses could return a wrong
result set if the having condition contained a constant conjunct
evaluated to FALSE.
It happened because the pushdown condition for table with
grouping columns lost its constant conjuncts.
Pushdown conditions are always built by the function make_cond_for_table
that ignores constant conjuncts. This is apparently not correct when
constant false conjuncts are present.
mysql-test/r/having.result:
Added a test case for bug #14927.
mysql-test/t/having.test:
Added a test case for bug #14927.
sql/sql_lex.cc:
Fixed bug #14927.
Initialized fields for having conditions in st_select_lex::init_query().
sql/sql_lex.h:
Fixed bug #14927.
Added a field to restore having condititions for execution in SP and PS.
sql/sql_prepare.cc:
Fixed bug #14927.
Added code to restore havinf conditions for execution in SP and PS.
sql/sql_select.cc:
Fixed bug #14927.
Performed evaluation of constant expressions in having clauses.
If the having condition contains a constant conjunct that is always false
an empty result set is returned after the optimization phase.
In this case the corresponding EXPLAIN command now returns
"Impossible HAVING" in the last column.
Diffstat (limited to 'SSL')
0 files changed, 0 insertions, 0 deletions