[MDEV-31623] Unexpected behaviour of FULL JOIN Created: 2023-07-04 Updated: 2023-07-05 Resolved: 2023-07-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 11.0.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Ralf Adams | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Docker under Debian |
||
| Attachments: |
|
| Description |
|
The option FULL JOIN works as an INNER JOIN. This is missleading, because you expect the result of a FULL OUTER JOIN or an error message. |
| Comments |
| Comment by Alice Sherepa [ 2023-07-05 ] |
|
There is no FULL join in MariaDb ( https://mariadb.com/kb/en/join-syntax/ ), so the word FULL was interpreted as an alias for the table- so no error, just inner join. In the second example - FULL OUTER JOIN - again FULL-alias, but then OUTER - it should be LEFT OUTER or RIGHT OUTER , otherwise - sql syntax error. |
| Comment by Ralf Adams [ 2023-07-05 ] |
|
Thanks for this quick answer. This explains the behaviour. But I think it is very missleading in this case. It looks like a short version of a FULL OUTER JOIN because OUTER is optional and by not receiving an error message you may think that this is a FULL OUTER JOIN result. |