-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Wrong LIMIT rewrite while GROUP BY and ORDER BY on different items #2062
Comments
@joooohnli Please try to describe the "Expected behavior" and "Actual behavior" clearly. I'm not saying you must use many words. Think about it very carefully before you responsd, thanks. |
Expected behaviorWhat I input is limit 0, 10 Actual behaviorWhat I really got is limit 0, 2147483647 you can see as below:
|
I am not very sure what's the problem. I don't know where the log come from. So I must know the behavior.
Please answer are the two above right? If they are right, please prove you got 2147483647 rows, you don't need to past all 2147483647, but try to prove it. Don't use log to prove it, I think the log is not from Sharding-JDBC. Also, please provide the example codes and configurations. BTW, What I input is limit 0, 10 is your behavior, it's not the program behavior. |
@tuohai666
And TEST is just a single table in defaultDataSource. (in fact this issue also occurs to sharding table) The log comes from my jdbc monitor, it shows the real sql that jdbc sends to physical db. If you think the log is not convincing. I can show you the debug info: Actually you could have reproduced this bug according to the Steps to reproduce the behavior. |
|
Thanks for your effort. This is the exactly information I wanted. |
#2062, Wrong LIMIT rewrite while GROUP BY and ORDER BY on different items
@joooohnli Resolved. Thanks for your report. You can try with dev branch now. This modification will be included in 4.0.0-RC1 which will be released this week. |
so, will there be no hotfix for 3.x? @terrymanu |
I also had this issue in 【4.1.1】Bug ReportFor English only, other languages will not accept. Before report a bug, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details. Please answer these questions before submitting your issue. Thanks! Which version of ShardingSphere did you use?4.1.1 Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?ShardingSphere-JDBC Expected behaviorI want to return 10 pieces of data in the SQL result Actual behaviorThe rewritten SQL queries 2147483647 pieces of data Reason analyze (If you can)Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.ShardingSphere-SQL LOG detail
Example codes for reproduce this issue (such as a github link).
|
Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details.
If no response more than 7 days and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
3.1.0
Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
Expected behavior
limit 0, 10
Actual behavior
Reason analyze (If you can)
logic error:
io.shardingsphere.core.routing.router.sharding.ParsingSQLRouter#processLimit
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Run it with PreparedStatement:
Example codes for reproduce this issue (such as a github link).
The text was updated successfully, but these errors were encountered: