We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
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); select * from (t3 cross join t4) natural join t1; select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4); select * from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b);
mysql> select * from t1 natural join (t3 cross join t4); ERROR 1052 (23000): Column 'c' in from clause is ambiguous mysql> select * from (t3 cross join t4) natural join t1; ERROR 1052 (23000): Column 'c' in from clause is ambiguous mysql> 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 mysql> 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
mysql> mysql> select * from t1 natural join (t3 cross join t4); Empty set (0.00 sec) mysql> select * from (t3 cross join t4) natural join t1; Empty set (0.00 sec) mysql> select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4); Empty set (0.00 sec) mysql> select * from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b); Empty set (0.00 sec)
| Release Version: v5.5.0-alpha-168-g23f7e51ae Edition: Community Git Commit Hash: 23f7e51ae01287fa7f811e1462d8987e4d7727a4 Git Branch: master UTC Build Time: 2022-01-27 17:39:21 GoVersion: go1.17.2 Race Enabled: false TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 Check Table Before Drop: false |
The text was updated successfully, but these errors were encountered:
ORDER BY
planner: fix name ambiguous check when building natural join without …
41f56d1
…filter (#36012) close #32044
d686efd
…filter (#36012) (#50904) close #32044
295ab16
…filter (#36012) (#51068) close #32044
winoros
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: