Skip to content
New issue

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

the name resolve of query is really different from MySQL #24622

Open
xiongjiwei opened this issue May 13, 2021 · 4 comments
Open

the name resolve of query is really different from MySQL #24622

xiongjiwei opened this issue May 13, 2021 · 4 comments

Comments

@xiongjiwei
Copy link
Contributor

xiongjiwei commented May 13, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

select * from (select 1 as a) t where test.t.a=1;
select * from (select 1 as a) t, test.t where test.t.a=1;
select * from (select 1 as a) t, test.t where t.a=1;
select * from (select 1 as a) t, t where test.t.a=1;

2. What did you expect to see? (Required)

run success except for 3th.

3. What did you see instead (Required)

all failed

4. What is your TiDB version? (Required)

@longfeiss
Copy link

Is there any document about how MySQL search table in queries?

@xiongjiwei
Copy link
Contributor Author

Is there any document about how MySQL search table in queries?

sorry, I cannot find the official doc about it, maybe you can take a look at https://dev.mysql.com/doc/refman/8.0/en/identifier-qualifiers.html

@dveeden
Copy link
Contributor

dveeden commented Jun 16, 2021

https://dev.mysql.com/doc/dev/mysql-server/latest/ might be useful here. sql/sql_resolver.cc and sql/table.cc might contain some of the info you are looking for.

@winoros
Copy link
Member

winoros commented Nov 23, 2021

This is one is also familiar with #25364. We need a discussion about the behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants