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

bug: order by literal with limit return error #16914

Open
1 of 2 tasks
b41sh opened this issue Nov 22, 2024 · 0 comments · May be fixed by #16967
Open
1 of 2 tasks

bug: order by literal with limit return error #16914

b41sh opened this issue Nov 22, 2024 · 0 comments · May be fixed by #16967
Labels
C-bug Category: something isn't working found-by-sqlsmith good first issue Category: good first issue

Comments

@b41sh
Copy link
Member

b41sh commented Nov 22, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

v1.2.662

What's Wrong?

order by literal with limit return error

we can ignore order by item if it is a scalar value

How to Reproduce?

MySQL [(none)]> create table tt(a int, b int);
Query OK, 0 rows affected (0.187 sec)

MySQL [(none)]> insert into tt values(1, 2),(3, 4);
Query OK, 2 rows affected (0.209 sec)

MySQL [(none)]> select eq(tt.a, b) FROM tt ORDER BY 'a' LIMIT 89, 7;
ERROR 1105 (HY000): BadArguments. Code: 1006, Text = Unable to get field named "0". Valid fields: ["4"].

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@b41sh b41sh added C-bug Category: something isn't working found-by-sqlsmith good first issue Category: good first issue labels Nov 22, 2024
@chagelo chagelo linked a pull request Nov 28, 2024 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working found-by-sqlsmith good first issue Category: good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant