Loading mysql-test/r/select.result +15 −0 Original line number Diff line number Diff line Loading @@ -2803,3 +2803,18 @@ f1 f2 f3 f4 2 2 2 one 2 2 2 two 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; create table t1 (pk int primary key, b int); create table t2 (pk int primary key, c int); select pk from t1 inner join t2 using (pk); pk drop table t1,t2; mysql-test/t/select.test +23 −0 Original line number Diff line number Diff line Loading @@ -2371,3 +2371,26 @@ insert into t1 values (" 2", 2); insert into t2 values (" 2", " one "),(" 2", " two "); select * from t1 left join t2 on f1 = f3; 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; # # Bug #10646 Columns included in the join between two tables are ambigious # in the select # create table t1 (pk int primary key, b int); create table t2 (pk int primary key, c int); select pk from t1 inner join t2 using (pk); drop table t1,t2; Loading
mysql-test/r/select.result +15 −0 Original line number Diff line number Diff line Loading @@ -2803,3 +2803,18 @@ f1 f2 f3 f4 2 2 2 one 2 2 2 two 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; create table t1 (pk int primary key, b int); create table t2 (pk int primary key, c int); select pk from t1 inner join t2 using (pk); pk drop table t1,t2;
mysql-test/t/select.test +23 −0 Original line number Diff line number Diff line Loading @@ -2371,3 +2371,26 @@ insert into t1 values (" 2", 2); insert into t2 values (" 2", " one "),(" 2", " two "); select * from t1 left join t2 on f1 = f3; 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; # # Bug #10646 Columns included in the join between two tables are ambigious # in the select # create table t1 (pk int primary key, b int); create table t2 (pk int primary key, c int); select pk from t1 inner join t2 using (pk); drop table t1,t2;