[MDEV-2156] LP:1009187 - Wrong result for a query with [NOT] IN subquery predicate if the left part of the predicate is explicit NULL Created: 2012-06-05 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: | Critical |
| Reporter: | Igor Babaev | Assignee: | Timour Katchaounov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Let's create and populate tables t1 and subq with the following commands: CREATE TABLE t1 (pk INT NOT NULL, i INT); Then the query However in MariaDB 5.1/5.2/5.3/5.5 we have: MariaDB [test]> SELECT * FROM t1 WHERE NULL NOT IN (SELECT i FROM t2 WHERE t2.pk = t1.pk);
---
--- We also have wrong results for the query MariaDB [test]> SELECT * FROM t1 WHERE NULL IN (SELECT i FROM t2 WHERE t2.pk = t1.pk) IS UNKNOWN;
---
--- This bug supposedly is fixed mysql-5.6 (see http://bugs.mysql.com/bug.php?id=58628) |
| Comments |
| Comment by Oleksandr Byelkin [ 2012-06-29 ] |
|
Re: Wrong result for a query with [NOT] IN subquery predicate if the left part of the predicate is explicit NULL |
| Comment by Oleksandr Byelkin [ 2012-07-06 ] |
|
Re: Wrong result for a query with [NOT] IN subquery predicate if the left part of the predicate is explicit NULL But the patch based on http://lists.mysql.com/commits/142813 which subsitute unique subquery engine with index one. |
| Comment by Rasmus Johansson (Inactive) [ 2012-09-18 ] |
|
Launchpad bug id: 1009187 |