mirror of
https://github.com/MariaDB/server.git
synced 2025-11-18 07:48:43 +03:00
Test case for BUG#6558 - Views: create fails with JOIN ... USING
The bug is non-view specific, and it resulted from incorrect name resolution of natural join result columns. The bug is fixed by WL#2486.
This commit is contained in:
@@ -2765,3 +2765,13 @@ f1 f2 f3 f4
|
|||||||
2 2 2 one
|
2 2 2 one
|
||||||
2 2 2 two
|
2 2 2 two
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
create table t1 (empnum smallint, grp int);
|
||||||
|
create table t2 (empnum int, name char(5));
|
||||||
|
insert into t1 values(1,1);
|
||||||
|
insert into t2 values(1,'bob');
|
||||||
|
create view v1 as select * from t2 inner join t1 using (empnum);
|
||||||
|
select * from v1;
|
||||||
|
empnum name grp
|
||||||
|
1 bob 1
|
||||||
|
drop table t1,t2;
|
||||||
|
drop view v1;
|
||||||
|
|||||||
@@ -2358,3 +2358,16 @@ insert into t1 values (" 2", 2);
|
|||||||
insert into t2 values (" 2", " one "),(" 2", " two ");
|
insert into t2 values (" 2", " one "),(" 2", " two ");
|
||||||
select * from t1 left join t2 on f1 = f3;
|
select * from t1 left join t2 on f1 = f3;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #6558 Views: CREATE VIEW fails with JOIN ... USING
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (empnum smallint, grp int);
|
||||||
|
create table t2 (empnum int, name char(5));
|
||||||
|
insert into t1 values(1,1);
|
||||||
|
insert into t2 values(1,'bob');
|
||||||
|
create view v1 as select * from t2 inner join t1 using (empnum);
|
||||||
|
select * from v1;
|
||||||
|
drop table t1,t2;
|
||||||
|
drop view v1;
|
||||||
|
|||||||
Reference in New Issue
Block a user