[MDEV-10095] Fix derived table to return a syntax error instead of "Illegal usage of UNION and LIMIT" Created: 2016-05-21  Updated: 2016-05-21  Resolved: 2016-05-21

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

Type: Bug 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 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.


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