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

ranger: fix the range construction behavior when the column's type is YEAR (#23559) #24018

Closed

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Apr 14, 2021

cherry-pick #23559 to release-5.0
You can switch your code base to this Pull Request by using git-extras:

# In tidb repo:
git pr https://github.com/pingcap/tidb/pull/24018

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/tidb.git pr/24018:release-5.0-670b5fbcf5ad

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

  • Need to cherry-pick to the release branch

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

  • fix wrong year type

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot requested review from a team as code owners April 14, 2021 08:04
@ti-srebot ti-srebot requested review from wshwsh12 and removed request for a team April 14, 2021 08:04
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-srebot ti-srebot requested review from hanfei1991 and removed request for a team April 14, 2021 08:04
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@wjhuang2016 you're already a collaborator in bot's repo.

@eurekaka
Copy link
Contributor

@wjhuang2016 please take a look at the failed CI.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 17, 2021
@winoros winoros removed their request for review June 21, 2021 09:39
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 21, 2021
Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve conflicts @wjhuang2016

@lysu
Copy link
Contributor

lysu commented Aug 20, 2021

Please resolve conflicts @wjhuang2016 🤣 ... too many test cases false-fail everyday in 5.0

@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 20, 2021
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Aug 30, 2021
@eurekaka
Copy link
Contributor

eurekaka commented Sep 2, 2021

Not critical enough to be merged into 5.0.

@eurekaka eurekaka closed this Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. component/expression sig/execution SIG execution sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/bugfix This PR fixes a bug. type/5.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants