@@ -886,3 +886,14 @@ INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM (SELECT * FROM t1 LIMIT 1 LIMIT 2) t1;
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 'LIMIT 2) t1' at line 1
DROP TABLE t1;
#
# MDEV-10109 Disallow syntactically INSERT .. SELECT .. {ORDER BY ..| LIMIT ..} .. UNION ..
#
INSERT INTO t1 SELECT 1 ORDER BY 1 UNION SELECT 2;
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 'UNION SELECT 2' at line 1
INSERT INTO t1 SELECT 1 LIMIT 1 UNION SELECT 2;
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 'UNION SELECT 2' at line 1
CREATE TABLE t1 AS SELECT 1 ORDER BY 1 UNION SELECT 2;
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 'UNION SELECT 2' at line 1
CREATE TABLE t1 AS SELECT 1 LIMIT 1 UNION SELECT 2;
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 'UNION SELECT 2' at line 1
@@ -128,7 +128,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
select a,b from t1 order by a union select a,b from t2;
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 'union select a,b from t2' at line 1
insert into t3 select a from t1 order by a union select a from t2;
ERROR HY000: Incorrect usage of UNION and ORDER BY
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 'union select a from t2' at line 1
create table t3 select a,b from t1 union select a from t2;
ERROR 21000: The used SELECT statements have a different number of columns