summaryrefslogtreecommitdiff
path: root/mysql-test/r/view.result
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2012-12-05 21:06:00 +0200
committerunknown <sanja@montyprogram.com>2012-12-05 21:06:00 +0200
commit0aad592f49f0fb790f712aa6a644653cf9a0218f (patch)
treed713e519c8c297ec3d018de78060b8e6c44d097a /mysql-test/r/view.result
parentb01fbb8e48327300b09c90ca94b9ba7b655adbb6 (diff)
downloadmariadb-git-0aad592f49f0fb790f712aa6a644653cf9a0218f.tar.gz
MDEV-3914 fix.
Fixed algorithm of detecting of first real table in view/subquery-in-the-FROM-clase.
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r--mysql-test/r/view.result24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index c12bf8ada06..74c36a2d394 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -4568,6 +4568,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)