diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-06-30 15:06:54 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2021-06-30 15:06:54 +0300 |
commit | 586870f9effa48831fda2590f2aee2b95b30be39 (patch) | |
tree | bc674573cb34b871045c4db1ebd7d7eea1349314 /mysql-test/main/cte_nonrecursive.test | |
parent | 29098083f7ac3b445ee59c3e765eb634ec70b947 (diff) | |
parent | eb20c91b55e4b51be533314994b36bf9b24016f3 (diff) | |
download | mariadb-git-586870f9effa48831fda2590f2aee2b95b30be39.tar.gz |
Merge 10.2->10.3
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 dcb76e47034..ac74683ad44 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 # |