-
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
Param as column alias can't be parsed in group statement #53872
Comments
I think it's caused by the special behavior of Every day I can learn a new mystery behavior of SQL. |
A workaround:
|
Maybe order by will have the same problem ~ @qw4990 |
I tested "order-by" as well and it doesn't have this problem since the optimizer doesn't replace |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
No error
3. What did you see instead (Required)
ERROR 1105 (HY000): Unknown column '100' in 'group statement'
4. What is your TiDB version? (Required)
v8.1.0
The text was updated successfully, but these errors were encountered: