diff options
author | Igor Babaev <igor@askmonty.org> | 2010-09-11 08:20:35 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2010-09-11 08:20:35 -0700 |
commit | 577b7345c7d98a1bdd9672398b9755ea9b853759 (patch) | |
tree | ff2ee8c183a730bbd42d614c217dd5f3fe462176 /mysql-test/r/table_elim.result | |
parent | 6f59c41d2dfad95ecdb161d6b08ec4cce736f7a8 (diff) | |
download | mariadb-git-577b7345c7d98a1bdd9672398b9755ea9b853759.tar.gz |
Fixed bug #49600.
The problem could be demonstrated with an outer join of two single-row
tables where the values of the join attributes were null. Any query
with such a join could return a wrong result set if the where
condition of the query was not empty. For queries with empty
where conditions the result sets were correct.
This was the consequence of two bugs in the code:
- Item_equal objects for on conditions of outer joins were
not built if the processed query had no where condition
- the check for null values in the code that evaluated constant
Item_equal objects was incorrect.
Fixed both above problems.
Added a test case for the bug and adjusted results for some other
test cases.
Diffstat (limited to 'mysql-test/r/table_elim.result')
-rw-r--r-- | mysql-test/r/table_elim.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/table_elim.result b/mysql-test/r/table_elim.result index 2cb3b543bb7..395b0be7e34 100644 --- a/mysql-test/r/table_elim.result +++ b/mysql-test/r/table_elim.result @@ -60,7 +60,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t0 ALL NULL NULL NULL NULL 4 100.00 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Warnings: -Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t0` left join (`test`.`t1`) on((`test`.`t0`.`a` = `test`.`t1`.`a`)) where 1 +Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t0` left join (`test`.`t1`) on((`test`.`t1`.`a` = `test`.`t0`.`a`)) where 1 # Elimination with aggregate functions explain select count(*) from t1 left join t2 on t2.a=t1.a; id select_type table type possible_keys key key_len ref rows Extra |