[MDEV-2231] LP:729067 - Wrong result with STRAIGHT_JOIN + OR + IN subquery in maria-5.3, maria-5.3-mwl89 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 |
|
Reproducible in maria-5.3, maria-5.3-mwl89 regardless of switch. Not reproducible in maria-5.2, mysql-5.5 The following query: SELECT STRAIGHT_JOIN * returns no rows even though there is one row for which t2.f2 = t1.f1 and t1.f1 = 9 is TRUE , hence the entire WHERE clause is true. I was unable to remove STRAIGHT_JOIN even if I rotated the places of t1 and t2. EXPLAIN: id select_type table type possible_keys key key_len ref rows Extra test case: CREATE TABLE t1 ( f1 int, f2 int, PRIMARY KEY (f1)) ; CREATE TABLE t2 ( f1 int, f2 int, PRIMARY KEY (f1)) ; SELECT STRAIGHT_JOIN * |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2011-03-09 ] |
|
Re: Wrong result with STRAIGHT_JOIN + OR + IN subquery in maria-5.3, maria-5.3-mwl89 Both this, and BUG#730466 require STRAIGHT_JOIN |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 729067 |