diff options
author | Igor Babaev <igor@askmonty.org> | 2016-08-29 22:45:17 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-08-29 22:45:17 -0700 |
commit | 9ac235ab7ddaefb2191a03d3e9cb025d584e3c36 (patch) | |
tree | 1bdf1222108233b1ec1e753328b704cd1b55a041 /mysql-test/t/cte_nonrecursive.test | |
parent | c8f85bf263a81a625089507d747236852ec87024 (diff) | |
download | mariadb-git-9ac235ab7ddaefb2191a03d3e9cb025d584e3c36.tar.gz |
mdev-9864: cleanup, re-factoring.
Added comments.
Added reaction for exceeding maximum number of elements in with clause.
Added a test case to check this reaction.
Added a test case where the specification of a recursive table
uses two non-recursive with tables.
Diffstat (limited to 'mysql-test/t/cte_nonrecursive.test')
-rw-r--r-- | mysql-test/t/cte_nonrecursive.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/cte_nonrecursive.test b/mysql-test/t/cte_nonrecursive.test index eb6677e7f75..414b1c27687 100644 --- a/mysql-test/t/cte_nonrecursive.test +++ b/mysql-test/t/cte_nonrecursive.test @@ -469,6 +469,20 @@ explain with t as (select a, count(*) from t1 where b >= 'c' group by a) select t1.b from t2,t1 where t1.a = t2.c; +--echo # too many with elements in with clause +let $m= 65; +let $i= $m; +dec $i; +let $q= with s$m as (select * from t1); +while ($i) +{ + let $q= $q, s$i as (select * from t1) ; + dec $i; + } +let $q= $q select * from s$m; +--ERROR ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE +eval $q; + drop table t1,t2; --echo # |