Skip to content

tidb reports "Can't find column" error from v8.5.0 when there are multiple joins in the query #60692

@time-and-fate

Description

@time-and-fate

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t1(a int, b int, c int, d int, e int);
create table t2(a int, b int, c int, d int, e int);
create table t3(a int, b int, c int, d int, e int);
create table t4(a int, b int, c int, d int, e int);
create table t5(a int, b int, c int, d int, e int);
explain select tmp4.b from t1 join t2 on t1.a = t2.b join t3 on t1.b = t3.b left join (select a, b, c, (row_number() over (partition by b order by e asc)) from t4) tmp4 on tmp4.b = t2.c and tmp4.c = t3.c join t5 on t5.a = t1.e;

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

Show the execution plan.

3. What did you see instead (Required)

ERROR 1105 (HY000): Can't find column test.t4.b in schema Column: [] Unique key: []

4. What is your TiDB version? (Required)

v8.5.0, v9.0.0-beta.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions