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

PointGetPlan needs to resolve order by clause #49920

Closed
jackysp opened this issue Dec 29, 2023 · 1 comment · Fixed by #50204
Closed

PointGetPlan needs to resolve order by clause #49920

jackysp opened this issue Dec 29, 2023 · 1 comment · Fixed by #50204
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. found/gs found by gs severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@jackysp
Copy link
Member

jackysp commented Dec 29, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t (i int key);
select * from t where i = 1 order by j limit 10;

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

mysql> create table t (i int key);
Query OK, 0 rows affected (0.01 sec)

mysql> select * from t where i = 1 order by j limit 10;
ERROR 1054 (42S22): Unknown column 'j' in 'order clause'

3. What did you see instead (Required)

mysql> create table t (i int key);
Query OK, 0 rows affected (0.08 sec)

mysql> select * from t where i = 1 order by j limit 10;

4. What is your TiDB version? (Required)

c766530

@jackysp jackysp added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner found/gs found by gs labels Dec 29, 2023
@jackysp
Copy link
Member Author

jackysp commented Dec 29, 2023

It should affect versions from v2.1 to v7.5.

@seiya-annie seiya-annie added affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. labels Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. found/gs found by gs severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants