[MDEV-13146] Syntax error when using FULL JOIN with table aliases Created: 2017-06-21 Updated: 2017-06-22 Resolved: 2017-06-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 10.0.10 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Pedro G. Acevedo | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
*nix |
||
| Description |
|
A SELECT query that uses a FULL JOIN fails with a syntax error if you use table aliases in the query. Code to reproduce: create table a(aa int); /* Returns one row. */ /* Fails with "check the manual that corresponds to your MariaDB server version for the right syntax to use near 'full join b b_alias on aa = bb' at line 1" */ |
| Comments |
| Comment by Sergei Golubchik [ 2017-06-22 ] |
|
This is not a bug. See the manual — there is no "FULL JOIN" in MariaDB, so when you specify a full join b, "full" is parsed as an alias for the table "a". Naturally, a table cannot have two aliases, so a a_alias full join b is a syntax error. |
| Comment by Pedro G. Acevedo [ 2017-06-22 ] |
|
Thank you. I knew I was having a hard time finding information on full join for MariaDB, but did not think that it was interpreting "full" as an alias. |