Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
These queries:
INSERT INTO t3 SELECT 1 ORDER BY 1 UNION SELECT 2; |
INSERT INTO t3 SELECT 1 LIMIT 1 UNION SELECT 2; |
CREATE TABLE t1 AS SELECT 1 ORDER BY 1 UNION SELECT 2; |
CREATE TABLE t1 AS SELECT 1 LIMIT 1 UNION SELECT 2; |
are currently disallowed by this code in add_select_to_union_list():
if (lex->current_select->order_list.first && !lex->current_select->braces) |
{
|
my_error(ER_WRONG_USAGE, MYF(0), "UNION", "ORDER BY"); |
return TRUE; |
}
|
 |
if (lex->current_select->explicit_limit && !lex->current_select->braces) |
{
|
my_error(ER_WRONG_USAGE, MYF(0), "UNION", "LIMIT"); |
return TRUE; |
}
|
We'll change the grammar to return syntax errors instead.
Attachments
Issue Links
- blocks
-
MDEV-8909 union parser cleanup
- Closed