[MDEV-2780] LP:994392 - Wrong result with RIGHT/LEFT JOIN and ALL subquery predicate in WHERE condition Created: 2012-05-04 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Igor Babaev | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following sequence of commands gives us a wrong result set in mariadb-5.2: CREATE TABLE t1(a INT); MariaDB [test]> SELECT * FROM t2 RIGHT JOIN t3 ON(c = b) WHERE b < ALL(SELECT a FROM t1 WHERE a <= 7); MariaDB [test]> EXPLAIN EXTENDED SELECT * FROM t2 RIGHT JOIN t3 ON(c = b) WHERE b < ALL(SELECT a FROM t1 WHERE a <= 7);
---
---
------
------ The bug is not reproducible in mariadb-5.3: MariaDB [test]> select version();
---------------------
--------------------- MariaDB [test]> SELECT * FROM t2 RIGHT JOIN t3 ON(c = b) WHERE b < ALL(SELECT a FROM t1 WHERE a <= 7);
-----
----- MariaDB [test]> EXPLAIN EXTENDED SELECT * FROM t2 RIGHT JOIN t3 ON(c = b) WHERE b < ALL(SELECT a FROM t1 WHERE a <= 7);
---
--- MariaDB [test]> show warnings;
------
------ (See also bug #13735712 for mysql code line) |
| Comments |
| Comment by Oleksandr Byelkin [ 2012-05-10 ] |
|
Re: Wrong result with RIGHT JOIN and ALL subquery predicate in WHERE condition |
| Comment by Oleksandr Byelkin [ 2012-05-10 ] |
|
Re: Wrong result with RIGHT JOIN and ALL subquery predicate in WHERE condition Cause of the bug is incorrect not_null_tables of Item_func_not_all (it makes optimizer thinks that the function will reject NULLs). |
| Comment by Rasmus Johansson (Inactive) [ 2012-05-11 ] |
|
Launchpad bug id: 994392 |