diff options
author | unknown <sanja@askmonty.org> | 2011-07-20 21:48:41 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2011-07-20 21:48:41 +0300 |
commit | 2b6a23447b65791033a641c5536819fcf4a7a5df (patch) | |
tree | a713e42086899347fa7d51c8d470904be4385b8b /mysql-test/suite | |
parent | 36be492dc00c6aeb1eed4e871c5b10383184f559 (diff) | |
download | mariadb-git-2b6a23447b65791033a641c5536819fcf4a7a5df.tar.gz |
Fix of LP BUG#780386.
ALL subquery should return TRUE if subquery rowa set is empty independently
of left part. The problem was that Item_func_(eq,ne,gt,ge,lt,le) do not
call execution of second argument if first is NULL no in this case subquery
will not be executed and when Item_func_not_all calls any_value() of the
subquery or aggregation function which report that there was rows. So for
NULL < ALL (SELECT...) result was FALSE instead of TRUE.
Fix is just swapping of arguments of Item_func_(eq,ne,gt,ge,lt,le) (with
changing the operation if it is needed) so that result will be the same
(for examole a < b is equal to b > a). This fix exploit the fact that
first argument will be executed in any case.
mysql-test/r/subselect.result:
The test suite added.
mysql-test/r/subselect_no_mat.result:
The test suite added.
mysql-test/r/subselect_no_opts.result:
The test suite added.
mysql-test/r/subselect_no_semijoin.result:
The test suite added.
mysql-test/r/subselect_scache.result:
The test suite added.
mysql-test/t/subselect.test:
The test suite added.
sql/item_cmpfunc.cc:
Swap arguments creation methods added.
sql/item_cmpfunc.h:
Swap arguments creation methods added.
sql/item_subselect.cc:
Swap arguments of the comparison.
Diffstat (limited to 'mysql-test/suite')
0 files changed, 0 insertions, 0 deletions