Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4271

[PATCH] STRAIGHT_JOIN does not support USING(), NATURAL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.1, 5.5.30
    • Fix Version/s: 10.0.4
    • Component/s: None
    • Labels:

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              hholzgra Hartmut Holzgraefe added a comment -

              NATURAL INNER JOIN also doesn't work ...

              Show
              hholzgra Hartmut Holzgraefe added a comment - NATURAL INNER JOIN also doesn't work ...
              Show
              hholzgra Hartmut Holzgraefe added a comment - Proposed patch: http://bazaar.launchpad.net/~hartmut-php/maria/mdev-4271/revision/3504
              Hide
              elenst Elena Stepanova added a comment -

              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.

              Show
              elenst Elena Stepanova added a comment - 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.
              Hide
              hholzgra Hartmut Holzgraefe added a comment -

              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/ )

              Show
              hholzgra Hartmut Holzgraefe added a comment - 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/ )
              Hide
              monty Michael Widenius added a comment -

              Reviewed, tests run and pushed into 10.0-base

              Show
              monty Michael Widenius added a comment - Reviewed, tests run and pushed into 10.0-base

                People

                • Assignee:
                  monty Michael Widenius
                  Reporter:
                  hholzgra Hartmut Holzgraefe
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 hour
                    1h