mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-10030 sql_yacc.yy: Split table_expression and remove PROCEDURE from create_select, select_paren_derived, select_derived2, query_specification
This change refactors the "table_expression" rule in sql_yacc.yy. Queries with subselects and derived tables, as well as "CREATE TABLE ... SELECT" now return syntax error instead of "Incorrect usage of PROCEDURE and ...".
This commit is contained in:
@ -686,7 +686,7 @@ FOR UPDATE) a;
|
||||
SELECT 1 FROM
|
||||
(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
|
||||
PROCEDURE ANALYSE() FOR UPDATE) a;
|
||||
ERROR HY000: Incorrect usage of PROCEDURE and subquery
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE() FOR UPDATE) a' at line 3
|
||||
SELECT 1 FROM t1
|
||||
WHERE EXISTS(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
|
||||
FOR UPDATE);
|
||||
@ -694,7 +694,7 @@ FOR UPDATE);
|
||||
SELECT 1 FROM t1
|
||||
WHERE EXISTS(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
|
||||
PROCEDURE ANALYSE() FOR UPDATE);
|
||||
ERROR HY000: Incorrect usage of PROCEDURE and subquery
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE() FOR UPDATE)' at line 3
|
||||
SELECT 1 FROM t1
|
||||
UNION
|
||||
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
|
||||
|
Reference in New Issue
Block a user