diff options
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r-- | mysql-test/t/view.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 6029ad471f6..eb905b5c4df 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -5364,6 +5364,21 @@ select * from t2, t1, v1 where t1.a=t2.a and t1.a=v1.a; drop view v1; drop table t1,t2; +# +# MDEV-6785 Wrong result on 2nd execution of PS with aggregate function, FROM SQ or MERGE view +# + +create table t1 (i int not null); +insert into t1 values (1),(2); +create table t2 (j int not null); +insert into t2 values (11),(12); +create algorithm=merge view v3 as select t1.* from t2 left join t1 on (t2.j = t1.i); +prepare stmt from 'select count(v3.i) from t1, v3'; +execute stmt; +execute stmt; +drop table t1, t2; +drop view v3; + --echo # ----------------------------------------------------------------- --echo # -- End of 10.0 tests. --echo # ----------------------------------------------------------------- |