[MDEV-10103] Disallow syntactically UNION SELECT .. PROCEDURE ANALYSE() Created: 2016-05-23  Updated: 2016-05-24  Resolved: 2016-05-24

Status: Closed
Project: MariaDB Server
Component/s: Parser
Fix Version/s: 10.2.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-8909 union parser cleanup Closed

 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.


Generated at Thu Feb 08 07:39:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.