[MDEV-4271] [PATCH] STRAIGHT_JOIN does not support USING(), NATURAL Created: 2013-03-13 Updated: 2013-10-05 Resolved: 2013-10-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.1, 5.5.30 |
| Fix Version/s: | 10.0.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Hartmut Holzgraefe | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Description |
|
STRAIGHT_JOIN should be usable in every context where a regular JOIN can be used, but does not support: SELECT ... FROM t1 STRAIGHT_JOIN t2 USING(id); or SELECT ... FROM t1 NATURAL STRAIGHT_JOIN t2; yet. See also http://bugs.mysql.com/35268 |
| Comments |
| Comment by Hartmut Holzgraefe [ 2013-03-13 ] |
|
NATURAL INNER JOIN also doesn't work ... |
| Comment by Hartmut Holzgraefe [ 2013-03-13 ] |
|
Proposed patch: http://bazaar.launchpad.net/~hartmut-php/maria/mdev-4271/revision/3504 |
| Comment by Elena Stepanova [ 2013-03-13 ] |
|
It seems to be documented this way in http://dev.mysql.com/doc/refman/5.5/en/join.html, so I suppose technically it's a feature request more than a bug. As such, setting the Fixed version to 10.x. |
| Comment by Hartmut Holzgraefe [ 2013-03-14 ] |
|
Yes, the documentation matches the parser code ... For the STRAIGHT_JOIN part i might agree with feature request as this is a MySQL specific extension, it would add consistency though and allow for simply replacing a JOIN with a STRAIGHT_JOIN optimizer hint in every context without having to rewrite NATURAL JOIN or JOIN ... USING() into an equivalent JOIN ... ON clause first. The NATURAL INNER JOIN part is improving compliance with the SQL standard though ... ( https://kb.askmonty.org/en/syntax-rules/ ) |
| Comment by Michael Widenius [ 2013-03-17 ] |
|
Reviewed, tests run and pushed into 10.0-base |