diff options
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r-- | mysql-test/t/view.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 5f3bf031f8c..2a230e65493 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -4575,6 +4575,27 @@ SELECT * FROM ( drop tables t1,t2; +--echo # +--echo # MDEV-3876 Wrong result (extra rows) with ALL subquery +--echo # from a MERGE view (duplicate of MDEV-3873) +--echo # + +CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); + +CREATE TABLE t2 (b INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(3); + +CREATE OR REPLACE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t2; + +SELECT a FROM t1 AS alias +WHERE a >= ALL ( +SELECT b FROM t1 LEFT JOIN v1 ON (a = b) +WHERE a = alias.a ); + +drop view v1; +drop table t1,t2; + --echo # ----------------------------------------------------------------- --echo # -- End of 5.3 tests. --echo # ----------------------------------------------------------------- |