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

Fix derived table to return a syntax error instead of "Illegal usage of UNION and LIMIT"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2.1
    • Component/s: Parser
    • Labels:
      None

      Description

      This is similar to MDEV-10051, but for derived tables.

      This query:

      SELECT * FROM (SELECT 1 FROM t1 LIMIT 1 UNION ALL SELECT 2 FROM t2) AS t2;
      

      returns

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

      It should return a syntax error instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: