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.result | |
| 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.result')
| -rw-r--r-- | mysql-test/main/cte_nonrecursive.result | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/main/cte_nonrecursive.result b/mysql-test/main/cte_nonrecursive.result index 0992c97a857..550864b20c6 100644 --- a/mysql-test/main/cte_nonrecursive.result +++ b/mysql-test/main/cte_nonrecursive.result @@ -1964,6 +1964,61 @@ call p1(); ERROR 42S22: Unknown column 'a' in 'field list' drop procedure p1; drop table t1,t2; +# +# MDEV-20411: SP containing only one SELECT with WITH clause +# +create procedure sp1 () +with cte as (select 1 as a) select * from cte; +call sp1(); +a +1 +call sp1(); +a +1 +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(); +a +3 +7 +1 +7 +1 +1 +3 +1 +5 +call sp2(); +a +3 +7 +1 +7 +1 +1 +3 +1 +5 +create procedure sp3 () +with cte as (select * from t1 group by a) select * from cte; +call sp3(); +a +1 +3 +5 +7 +call sp3(); +a +1 +3 +5 +7 +drop procedure sp1; +drop procedure sp2; +drop procedure sp3; +drop table t1; # End of 10.2 tests # # MDEV-21673: several references to CTE that uses |
