1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

sql_yacc_ora.yy: syncing grammar for "MDEV-18844 Implement EXCEPT ALL and INTERSECT ALL operations"

This commit is contained in:
Alexander Barkov
2019-10-30 16:05:36 +04:00
parent f2cff12556
commit 74b4171591
3 changed files with 82 additions and 24 deletions

View File

@ -45,21 +45,27 @@ insert into t3 values (1,1),(3,3);
set SQL_MODE=ORACLE;
#(select a,b from t1) union all (select c,d from t2) intersect (select e,f from t3) union all (select 4,4);
--error ER_PARSE_ERROR
(select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
--error ER_PARSE_ERROR
explain extended (select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
explain extended
select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
explain extended
select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
explain extended
select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
select e,f from t3 intersect all select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
explain extended
select e,f from t3 intersect all select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
--error ER_PARSE_ERROR
(select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);
--error ER_PARSE_ERROR
explain extended (select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);
set SQL_MODE=default;
drop table t1,t2,t3;
set SQL_MODE=oracle;
--error ER_PARSE_ERROR
--error ER_NO_SUCH_TABLE
select * from t13 union select * from t234 intersect all select * from t12;
set SQL_MODE=default;
set SQL_MODE=default;