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

Unexpected error Unknown column 't1.c0' in 'where clause' #43569

Open
DerZc opened this issue May 6, 2023 · 0 comments
Open

Unexpected error Unknown column 't1.c0' in 'where clause' #43569

DerZc opened this issue May 6, 2023 · 0 comments
Labels

Comments

@DerZc
Copy link

DerZc commented May 6, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

The following program triggers this error, but actually t1.c0 not in where clause:

CREATE TABLE t0(c0 CHAR);
CREATE TABLE t1(c0 CHAR);
SELECT COUNT(t1.c0) AS c0 FROM  t0 NATURAL JOIN t1  WHERE 'Q';  -- Unknown column 't1.c0' in 'where clause'

I notice there are some other reports about this error message. For #42732 and #24324, the test case in this report does not contain subquery; for #35031, I tried SELECT COUNT(t1.c0) AS c0 FROM t0 NATURAL JOIN t1 WHERE t1.c0=1; and do not return any error.

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

No error.

3. What did you see instead (Required)

Unknown column 't1.c0' in 'where clause'

4. What is your TiDB version? (Required)

Release Version: v7.2.0-alpha-90-gb320fdca9\nEdition: Community\nGit Commit Hash: b320fdca9ff9dba02512b723908da3a8b2b82578\nGit Branch: master\nUTC Build Time: 2023-05-06 04:35:33\nGoVersion: go1.20.3\nRace Enabled: false\nTiKV Min Version: 6.2.0-alpha\nCheck Table Before Drop: false\nStore: unistore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants