-
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
ranger: fix the range construction behavior when the column's type is YEAR
#23559
Conversation
No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md |
/run-check_dev_2 |
YEAR
Can someone help me /lgtm? |
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
452f2c2
to
0deb55f
Compare
do we need fix this in 5.0 GA? @wjhuang2016 @winoros - - |
Sure , why not? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wjhuang2016 Please resolve conflicts at your convenience. And should we add some new and separated test cases for this PR?
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: fca84b2
|
/merge |
/merge |
/merge |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.0 in PR #24018 |
Signed-off-by: wjhuang2016 huangwenjun1997@gmail.com
What problem does this PR solve?
Issue Number: close #23508
Problem Summary:
The type of year should be int, not double.
What is changed and how it works?
Use ConvertToMysqlYear() to adjust the year constant, and handle some corner cases.
Related changes
Check List
Tests
Unit test
Manual test (add detailed scripts or steps below)
Start a tidb cluster.
CREATE TABLE
PK_S_MULTI_42_2
(COL1
year(4) NOT NULL,COL2
year(4) NOT NULL,COL3
year(4) DEFAULT NULL, PRIMARY KEY (COL1
,COL2
) clustered);mysql> select * from PK_S_MULTI_42_2 where col2 between 2154 and 2154 AND col3 > 2153;
Empty set (0.00 sec)
Side effects
Release note