-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
TiDB v6.1: ERROR 1105 (HY000): Can't find column test.tbl.id in schema Column: [Column#7] Unique key: [[test.tbl.id]] #35404
Comments
This is because the main select clause referred to the CTE t2 twice and cloned its schema in buildTableRef and BuildSelectSubq respectively. Nonetheless, it just forgets the wipe out the old schema column's hashcode, which will be used to map the parent column and child's column directly when doing the projection elimination. As a consequence, the join EQ-condition's columns will be mapped to a same left-child column causing resolveIndices chaos. |
I will file a PR later |
|
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
return success with empty set.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v6.1.0
Edition: Community
Git Commit Hash: 1a89dec
Git Branch: heads/refs/tags/v6.1.0
UTC Build Time: 2022-06-05 05:15:11
GoVersion: go1.18.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.001 sec)
The text was updated successfully, but these errors were encountered: