[MDEV-10012] OUTER JOIN of NATURAL JOINs is not supported Created: 2016-04-30 Updated: 2018-05-08 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 10.2.14 |
| Description |
|
This query:
produces an error:
This is a wrong behavior. It's a valid query according to the standard. The problem here is that the USING clause is related to the LEFT JOIN operation, while MariaDB tries to apply it to the second NATURAL JOIN. According to the Standard, NATURAL and CROSS joins have higher precedence over OUTER and INNER joins. So the above query should mean exactly the same with:
which works fine and does not produce syntax errors. |