mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Better emulation correct SELECT tree for fields expressions of merging view during name resolving (BUG#6394)
mysql-test/r/view.result: added test with subquery in the FROM clause mysql-test/t/view.test: added test with subquery in the FROM clause sql/table.cc: use SELECT in which view is merging as main SELECT for nameresolving to make correct support for subqueries in the view.
This commit is contained in:
@ -1744,6 +1744,9 @@ c1
|
||||
select * from v2;
|
||||
c1
|
||||
1
|
||||
select * from (select c1 from v2) X;
|
||||
c1
|
||||
1
|
||||
drop view v2, v1;
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (C1 INT, C2 INT);
|
||||
|
@ -1680,6 +1680,7 @@ create view v1 as SELECT c1 FROM t1 WHERE c1 IN (SELECT c2 FROM t2);
|
||||
create view v2 as SELECT c1 FROM t1 WHERE EXISTS (SELECT c2 FROM t2 WHERE c2 = c1);
|
||||
select * from v1;
|
||||
select * from v2;
|
||||
select * from (select c1 from v2) X;
|
||||
drop view v2, v1;
|
||||
drop table t1, t2;
|
||||
|
||||
|
Reference in New Issue
Block a user