[MDEV-3591] LP:729039 - Wrong result with EXISTS and NULLs in maria-5.3 , maria-5.3-mwl89 regardless of @@optimizer_switch Created: 2011-03-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: | Critical |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Repeatable in maria-5.3 and maria-5.3-mwl90 regardless of the switch. Not reproducible on maria-5.2 and mysql-5.5 The following query: SELECT * FROM t1 WHERE EXISTS ( SELECT f1 FROM t2 WHERE t1.f1 = t2.f1 ); Returns rows even though the tables contain only NULL values and for no rows the equality t1.f1 = t2.f1 is TRUE. The problem goes away if the tables have 1 row or if IGNORE INDEX is used to prevent the index on f1 from being used. explain: id select_type table type possible_keys key key_len ref rows Extra test case: CREATE TABLE t1 ( f1 varchar(1) , KEY (f1)) ; CREATE TABLE t2 ( f1 varchar(1) , KEY (f1)) ; SELECT * |
| Comments |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 729039 |