diff options
author | Igor Babaev <igor@askmonty.org> | 2018-01-05 12:13:23 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-01-05 12:13:23 -0800 |
commit | 15b1840f43be8c660382458826e9d5a47d148a67 (patch) | |
tree | e98073f14f65f8ad8a79159d5c33fe3ef8d40b25 /mysql-test/r/cte_recursive.result | |
parent | 578345305e261d635bfc938a5dc2a22b839c2148 (diff) | |
download | mariadb-git-15b1840f43be8c660382458826e9d5a47d148a67.tar.gz |
Added the test case from for mdev-14777: Crash in MariaDB 10.2.12 on query
using VIEW and WITH RECURSIVE.
The cause of this crash was the same as of the crash reported in mdev-14755.
Diffstat (limited to 'mysql-test/r/cte_recursive.result')
-rw-r--r-- | mysql-test/r/cte_recursive.result | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/cte_recursive.result b/mysql-test/r/cte_recursive.result index ece5421e279..300539a75b2 100644 --- a/mysql-test/r/cte_recursive.result +++ b/mysql-test/r/cte_recursive.result @@ -2944,3 +2944,31 @@ limit 1 ); ERROR HY000: Unacceptable mutual recursion with anchored table 'cte_1' drop table t1; +# +# mdev-14777: crash caused by the same as in mdev-14755 +# +CREATE TABLE t1 (i1 int NOT NULL, i2 int); +CREATE TABLE t2 (d1 int NOT NULL PRIMARY KEY); +CREATE TABLE t3 (i int ); +insert into t1 select seq,seq from seq_1_to_100000; +insert into t2 select seq from seq_1000_to_100000; +insert into t3 select seq from seq_1_to_1000; +SELECT * +FROM +( +SELECT * +FROM +( +WITH RECURSIVE rt AS +( +SELECT i2 P, i1 C FROM t1 WHERE i1 IN (SELECT d1 FROM t2) +UNION +SELECT t1.i2 P, rt.C C FROM t1, rt +) +SELECT C,P +FROM ( SELECT P,C FROM rt WHERE NOT EXISTS (SELECT 1 FROM t1) ) Y +) X +WHERE 1 = 1 +) K, t3; +C P i +drop table t1,t2,t3; |