diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-06-30 18:13:08 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2021-06-30 18:41:46 +0300 |
commit | eebe2090c848b5cedc5235473d80dbd2c25d2943 (patch) | |
tree | bd12d7d9809997b892437ef3b7341d330ee46147 /mysql-test/main/cte_nonrecursive.test | |
parent | a1e2ca057dda4dc434f057ce9391aa7afd9b5583 (diff) | |
parent | 4a6e2d343745c11086c05f0041a8267591bb073c (diff) | |
download | mariadb-git-eebe2090c848b5cedc5235473d80dbd2c25d2943.tar.gz |
Merge 10.3 -> 10.4
Diffstat (limited to 'mysql-test/main/cte_nonrecursive.test')
-rw-r--r-- | mysql-test/main/cte_nonrecursive.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/main/cte_nonrecursive.test b/mysql-test/main/cte_nonrecursive.test index c2a0a396717..12949ecdaed 100644 --- a/mysql-test/main/cte_nonrecursive.test +++ b/mysql-test/main/cte_nonrecursive.test @@ -1463,6 +1463,35 @@ drop procedure p1; drop table t1,t2; + +--echo # +--echo # MDEV-20411: SP containing only one SELECT with WITH clause +--echo # + +create procedure sp1 () +with cte as (select 1 as a) select * from cte; +call sp1(); +call sp1(); + +create table t1 (a int); +insert into t1 values (3), (7), (1), (7), (1), (1), (3), (1), (5); + +create procedure sp2 () +with cte as (select * from t1) select * from cte; +call sp2(); +call sp2(); + +create procedure sp3 () +with cte as (select * from t1 group by a) select * from cte; +call sp3(); +call sp3(); + +drop procedure sp1; +drop procedure sp2; +drop procedure sp3; + +drop table t1; + --echo # End of 10.2 tests --echo # |