diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-06-04 16:12:00 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-06-04 16:12:00 +0300 |
commit | b50685af82508ca1cc83e1743dff527770e6e64b (patch) | |
tree | abbbc2a2ca9f4f80b4cb0da2d775e037575204ab /mysql-test/main/cte_nonrecursive.test | |
parent | cac41001864ca503a7812b7f2a3b312435fb4ec4 (diff) | |
parent | 8dc70c862b8ec115fd9a3c2b37c746ffc4f0d3cc (diff) | |
download | mariadb-git-b50685af82508ca1cc83e1743dff527770e6e64b.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/main/cte_nonrecursive.test')
-rw-r--r-- | mysql-test/main/cte_nonrecursive.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/cte_nonrecursive.test b/mysql-test/main/cte_nonrecursive.test index 5e1770496f6..98a77940c99 100644 --- a/mysql-test/main/cte_nonrecursive.test +++ b/mysql-test/main/cte_nonrecursive.test @@ -1012,3 +1012,21 @@ SELECT a FROM cte; WITH cte(a,b) AS (SELECT 4,5 UNION SELECT 4,3) SELECT a,b FROM cte; DROP TABLE t1; + +--echo # +--echo # MDEV-16353: unreferenced CTE specified by query with UNION +--echo # + +with cte as + (select 1 union select 2 union select 3) +select 1 as f; + +create table t1 (a int); +insert into t1 values (2), (1), (7), (1), (4); + +with cte as + (select * from t1 where a < 2 union select * from t1 where a > 5) +select 2 as f; + +drop table t1; +
\ No newline at end of file |