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

union parser cleanup

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 10.2.2
    • Component/s: Parser
    • Labels:
      None
    • Sprint:
      10.2.1-1, 10.2.1-3, 10.2.1-4, 10.2.1-5

      Description

      This is a spin-off from MDEV-8380. The corresponding parser changes are too big to go into 10.1

      This task will remove a few "Incorrect usage of ... and ..." errors and will return "syntax error" instead.

      Example#1:

      SELECT * FROM t1 LIMIT 1 UNION SELECT * FROM t1 LIMIT 1;
      

      ERROR 1221 (HY000): Incorrect usage of UNION and LIMIT
      

      Example#2:

      SELECT * FROM (SELECT * FROM t1 PROCEDURE ANALYSE());
      

      ERROR 1221 (HY000): Incorrect usage of PROCEDURE and subquery
      

      Example#3:

      SELECT * FROM t1 NATURAL JOIN (SELECT * FROM t2 PROCEDURE ANALYSE());
      

      ERROR 1221 (HY000): Incorrect usage of PROCEDURE and subquery
      

      Example#4

      SELECT (SELECT 1 FROM t1 PROCEDURE ANALYSE()) FROM t2;
      

      ERROR 1221 (HY000): Incorrect usage of PROCEDURE and subquery
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration