diff options
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r-- | mysql-test/r/view.result | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8d2d1561456..8f32ca1f566 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -4780,6 +4780,30 @@ id id bbb iddqd val1 drop view v2; drop table t1,t2; # +# MDEV-3914: Wrong result (NULLs instead of real values) +# with INNER and RIGHT JOIN in a FROM subquery, derived_merge=on +# (fix of above MDEV-486 fix) +# +SET @save_optimizer_switch_MDEV_3914=@@optimizer_switch; +SET optimizer_switch = 'derived_merge=on'; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3),(4); +CREATE TABLE t3 (c INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (5),(6); +SELECT * FROM ( SELECT c FROM ( t1 INNER JOIN t2 ) RIGHT JOIN t3 ON a = c ) AS alias; +c +5 +6 +SET optimizer_switch = 'derived_merge=off'; +SELECT * FROM ( SELECT c FROM ( t1 INNER JOIN t2 ) RIGHT JOIN t3 ON a = c ) AS alias; +c +5 +6 +SET optimizer_switch=@save_optimizer_switch_MDEV_3914; +drop table t1,t2,t3; +# # MDEV-589 (LP BUG#1007647) : # Assertion `vcol_table == 0 || vcol_table == table' failed in # fill_record(THD*, List<Item>&, List<Item>&, bool) @@ -4822,6 +4846,23 @@ f2 f1 7 NULL 8 NULL drop tables t1,t2; +# +# MDEV-3876 Wrong result (extra rows) with ALL subquery +# from a MERGE view (duplicate of MDEV-3873) +# +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 ); +a +1 +drop view v1; +drop table t1,t2; # ----------------------------------------------------------------- # -- End of 5.3 tests. # ----------------------------------------------------------------- |