diff options
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 5a6e07e0c0c..e3164f53887 100644 --- a/mysql-test/t/cte_nonrecursive.test +++ b/mysql-test/t/cte_nonrecursive.test @@ -434,3 +434,17 @@ with t(f1,f1) as (select * from t1 where b >= 'c') select t1.b from t2,t1 where t1.a = t2.c; drop table t1,t2; + +--echo # +--echo # Bug mdev-9937: View used in the specification of with table +--echo # refers to the base table with the same name +--echo # + +create table t1 (a int); +insert into t1 values (20), (30), (10); +create view v1 as select * from t1 where a > 10; + +with t1 as (select * from v1) select * from t1; + +drop view v1; +drop table t1; |