Skip to content

Commit

Permalink
fix tes t
Browse files Browse the repository at this point in the history
Signed-off-by: AilinKid <314806019@qq.com>
  • Loading branch information
AilinKid committed Jan 29, 2024
1 parent 7cf8215 commit 1acdd9a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/integrationtest/r/executor/jointest/join.result
Original file line number Diff line number Diff line change
Expand Up @@ -1590,3 +1590,16 @@ insert into t1 values(2,3),(4,4);
select /*+ TIDB_HJ(t, t2) */ * from t, t1 where t.c1 = t1.c1;
c1 c2 c1 c2
2 2 2 3
drop table if exists t1,t2,t3,t4;
create table t1 (c int, b int);
create table t2 (a int, b int);
create table t3 (b int, c int);
create table t4 (y int, c int);
select * from t1 natural join (t3 cross join t4);
Error 1052 (23000): Column 'c' in from clause is ambiguous
select * from (t3 cross join t4) natural join t1;
Error 1052 (23000): Column 'c' in from clause is ambiguous
select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4);
Error 1052 (23000): Column 'b' in from clause is ambiguous
select * from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b);
Error 1052 (23000): Column 'b' in from clause is ambiguous
15 changes: 15 additions & 0 deletions tests/integrationtest/t/executor/jointest/join.test
Original file line number Diff line number Diff line change
Expand Up @@ -1089,3 +1089,18 @@ create table t1(c1 int, c2 int);
insert into t values(1,1),(2,2);
insert into t1 values(2,3),(4,4);
select /*+ TIDB_HJ(t, t2) */ * from t, t1 where t.c1 = t1.c1;

# TestIssue30244
drop table if exists t1,t2,t3,t4;
create table t1 (c int, b int);
create table t2 (a int, b int);
create table t3 (b int, c int);
create table t4 (y int, c int);
--error 1052
select * from t1 natural join (t3 cross join t4);
--error 1052
select * from (t3 cross join t4) natural join t1;
--error 1052
select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4);
--error 1052
select * from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b);

0 comments on commit 1acdd9a

Please sign in to comment.