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

Disallow syntactically UNION SELECT .. PROCEDURE ANALYSE()

    XMLWordPrintable

    Details

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

      Description

      This query:

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

      is disallowed by this code:

      procedure_clause:
        ...
        if (&lex->select_lex != lex->current_select)
        {
          // SELECT * FROM t1 UNION SELECT * FROM t2 PROCEDURE ANALYSE();
          my_error(ER_WRONG_USAGE, MYF(0), "PROCEDURE", "subquery");
          MYSQL_YYABORT;
        }
      

      It should be disallowed syntactically.

        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: