[MDEV-8909] union parser cleanup Created: 2015-10-06  Updated: 2016-09-13  Resolved: 2016-09-07

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

Type: Task Priority: Minor
Reporter: Sergei Golubchik Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-10030 sql_yacc.yy: Split table_expression a... Closed
is blocked by MDEV-10036 sql_yacc.yy: Split select_part2 to di... Closed
is blocked by MDEV-10037 UNION with LIMIT ROWS EXAMINED does n... Closed
is blocked by MDEV-10051 Fix subselect to return a syntax erro... Closed
is blocked by MDEV-10078 sql_yacc.yy: Remove non-parenthesized... Closed
is blocked by MDEV-10079 sql_yacc.yy: Remove non-parenthesized... Closed
is blocked by MDEV-10080 Derived tables allow double LIMIT clause Closed
is blocked by MDEV-10095 Fix derived table to return a syntax ... Closed
is blocked by MDEV-10101 Wrong error message of SELECT 1 UNION... Closed
is blocked by MDEV-10102 Disallow CREATE VIEW .. PROCEDURE ANA... Closed
is blocked by MDEV-10103 Disallow syntactically UNION SELECT .... Closed
is blocked by MDEV-10109 Disallow syntactically INSERT .. SELE... Closed
is blocked by MDEV-10124 Incorrect usage of CUBE/ROLLUP and OR... Closed
Relates
relates to MDEV-8380 Subquery parse error Closed
relates to MDEV-10028 Syntax error on ((SELECT ...) UNION (... Closed
relates to MDEV-10035 DBUG_ASSERT on CREATE VIEW v1 AS SELE... Closed
relates to MDEV-10096 Behaviour of SQL_NO_CACHE in derived ... Open
relates to MDEV-10120 Wrong result of UNION .. ORDER BY GRO... Closed
relates to MDEV-10122 MariaDB does not support group functi... Closed
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


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