[MDEV-13147] "Unknown column" error when using FULL JOIN with qualified field names 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 |
|
Running a SELECT query with FULL JOIN fails when some of the field names are qualified with their table names. The same query with a LEFT JOIN executes fine. Code to reproduce: create table a(aa int); /* Returns one row. */ /* Fails with "Unknown column 'a.aa' in 'field list'" */ /* Returns one row. */ /* Fails with "Unknown column 'a.aa' in 'on clause'" */ |
| 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". That's why a full join b on a.aa = bb fails, but a full join b on full.aa = bb should work. |
| 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. |