summaryrefslogtreecommitdiff
path: root/mysql-test/r/view.result
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2012-09-06 00:14:33 +0300
committerunknown <sanja@montyprogram.com>2012-09-06 00:14:33 +0300
commitcaedd1992c0926f41e3fb5f8b6f430d9a2a827a9 (patch)
tree608480bb375937718737c67d12dd3ec0edca303a /mysql-test/r/view.result
parent24b9d7e43f8251263863f52bfefb00eacf2523ae (diff)
parent54bb28d4a151d0eb5c3b74edb40ddf6e118c124b (diff)
downloadmariadb-git-caedd1992c0926f41e3fb5f8b6f430d9a2a827a9.tar.gz
merge 5.3->5.5
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r--mysql-test/r/view.result33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index b50f6b81206..1b35fe5a56a 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -4687,6 +4687,39 @@ a
1
drop view v2,v1;
drop table t1;
+#
+# MDEV-486 LP BUG#1010116 Incorrect query results in
+# view and derived tables
+#
+SELECT
+`Derived1`.`id`,
+`Derived2`.`Val1`
+FROM (select 30631 as `id`) AS `Derived1` LEFT OUTER JOIN (SELECT
+2 as `id`,
+1 AS `Val1`
+FROM (select 30631 as `id`) AS `Derived3`) AS `Derived2` ON `Derived1`.`id` = `Derived2`.`id`;
+id Val1
+30631 NULL
+create table t1 ( id int );
+insert into t1 values (30631);
+create table t2 ( id int );
+insert into t2 values (30631);
+create algorithm=MERGE view v2 as select 2 as id, 1 as val1 from t2;
+select t1.*, v2.* from t1 left join v2 on t1.id = v2.id;
+id id val1
+30631 NULL NULL
+drop view v2;
+drop table t1,t2;
+create table t1 ( id int );
+insert into t1 values (30631);
+create table t2 ( id int );
+insert into t2 values (30631);
+create algorithm=MERGE view v2 as select 2 as id, id is null as bbb, id as iddqd, 1 as val1 from t2;
+select t1.*, v2.* from t1 left join v2 on t1.id = v2.id;
+id id bbb iddqd val1
+30631 NULL NULL NULL NULL
+drop view v2;
+drop table t1,t2;
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -----------------------------------------------------------------