[MDEV-2604] LP:784281 - Wrong result from view containing outer reference in simijoin subquery Created: 2011-05-17  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Igor Babaev Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug784281.xml    

 Description   

A wrong result is returned by the query below for the test case of bug #33389 from mysql-test/t/view.test.

To reproduce the problem first execute the following statements:

create table t1 (a int, key(a));
create table t2 (c int);

create view v1 as select a b from t1;
create view v2 as select 1 a from t2, v1 where c in
(select 1 from t1 where b = a);

insert into t1 values (1), (1);
insert into t2 values (1), (1);

Then run the query
select * from v2.

You'll get:

MariaDB [test]> select * from v2;
Empty set (0.00 sec)

The expected result is:
MariaDB [test]> select * from v2;
---

a

---

1
1
1
1

---
4 rows in set (0.00 sec)



 Comments   
Comment by Igor Babaev [ 2011-05-17 ]

Re: Wrong result from view containing outer reference in simijoin subquery
This bug is observed only on the LP tree for mwl#106.

Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ]

Launchpad bug id: 784281

Generated at Thu Feb 08 06:42:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.