-
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
Wrong value when query a partition table with LIMIT
#24636
Comments
PTAL @mjonss |
@bb7133 Is it easy to fix? |
Looks that 1 projection is missing: v5.0:
v4.0:
|
@zhangjinpeng1987 , @mjonss is working on it, not so difficult. |
I can reproduce the |
@qw4990 I'm OK with reverting #20288 as a quick fix. Or do you mean something else by 'disabling inline-projection on Limit for partition tables'? I.e. should I add a condition to not do it for partitioned tables only? I would guess that it would be possible to create a test case using UNION instead of partitioning and hit this issue as well. |
OK, got it. Then it seems disabling it is not a good idea, but reverting #20288 seems also complex since there are quite a few changes after it. It's a bit late for me now, I'll go on to investigate it more detailedly tomorrow. |
It seems a complex issue about the optimizer. :( After Buf after physical optimization, one of these 2 ( This issue is more related to the optimizer instead of runtime or partition tables, so how about letting me go on to investigate it and you can have more time to solve other partition table issues. @mjonss |
I'm stuck in ONCALL this week and I'll go on to finish this next week. |
A minimal reproducible case:
|
Please edit this comment or add a new comment to complete the following informationNot a bug
Duplicate bug
BugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)2. Symptom (optional)3. All Trigger Conditions (optional)4. Workaround (optional)5. Affected versions6. Fixed versions |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Scripts:
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
TiDB v5.0.1
Other versions
It is not reproduced in v4.0, but in current master(aecff1c), an error is reported:
So I'll assume it is not a known bug.
Update: when the table is specified as `clustered, the error doesn't reproduce.
The text was updated successfully, but these errors were encountered: