[MDEV-6452] Table elimination not applied to outer joins without WHERE Created: 2014-07-17 Updated: 2015-03-04 Resolved: 2015-03-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.0.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Federico Razzoli | Assignee: | Sergei Petrunia |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | table-elimination | ||
| Description |
|
I have no idea if this is a bug, but I'd expect it to work, so I hope it's worth reporting. In the following test case the right table is read, but it doesn't affect the results in any way:
|
| Comments |
| Comment by Elena Stepanova [ 2014-07-17 ] | ||||||||||||||||||||||||||||||||||||
|
Hi Federico,
Why not? user.city_id is not unique, so the contents of the user table can easily affect the resultset of the query:
| ||||||||||||||||||||||||||||||||||||
| Comment by Federico Razzoli [ 2014-07-18 ] | ||||||||||||||||||||||||||||||||||||
|
SORRY, sometimes I'm so stupid. I forgot DISTINCT:
| ||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-07-18 ] | ||||||||||||||||||||||||||||||||||||
|
Thanks for clarification. | ||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-03-04 ] | ||||||||||||||||||||||||||||||||||||
|
"Semi-joins" are for subqueries. The example uses OUTER joins. changing the title. | ||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-03-04 ] | ||||||||||||||||||||||||||||||||||||
Considering the above, closing as "wont' fix". Feel free to reopen or file another bug if there arguments against the above. |