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: handle longlong overflow properly #52365

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Apr 7, 2024

What problem does this PR solve?

Issue Number: close #45783

Problem Summary:

What changed and how does it work?

bigint would be returned if overflow error occurs, so convertPoint would adjust the excl of the boundary accordingly, and impossible ranges would be removed by consequent validIntervals().

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Copy link

codecov bot commented Apr 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.4993%. Comparing base (6928519) to head (1f7bf35).
Report is 4 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52365        +/-   ##
================================================
+ Coverage   72.5278%   74.4993%   +1.9714%     
================================================
  Files          1505       1505                
  Lines        429901     430063       +162     
================================================
+ Hits         311798     320394      +8596     
+ Misses        98809      89764      -9045     
- Partials      19294      19905       +611     
Flag Coverage Δ
integration 48.7123% <100.0000%> (?)
unit 71.3476% <66.6666%> (-0.0783%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 50.4062% <ø> (+9.0022%) ⬆️

@ti-chi-bot ti-chi-bot bot added the sig/planner SIG: Planner label May 13, 2024
@hawkingrei hawkingrei changed the title planner: fix wrong result when to enable non-prepared plan cache ranger: handle longlong overflow properly when building index ranges May 22, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 22, 2024
@hawkingrei
Copy link
Member Author

/retest

@pingcap pingcap deleted a comment from ti-chi-bot bot May 22, 2024
@hawkingrei
Copy link
Member Author

/retest

1 similar comment
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei hawkingrei requested a review from qw4990 May 22, 2024 10:45
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei
Copy link
Member Author

@time-and-fate PTAL

@hawkingrei hawkingrei changed the title ranger: handle longlong overflow properly when building index ranges ranger: handle longlong overflow properly May 23, 2024
Copy link

ti-chi-bot bot commented May 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, winoros

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the lgtm label May 23, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label May 23, 2024
Copy link

ti-chi-bot bot commented May 23, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-05-22 09:47:10.871437256 +0000 UTC m=+2251384.628572821: ☑️ agreed by winoros.
  • 2024-05-23 01:08:40.972041524 +0000 UTC m=+2306674.729177097: ☑️ agreed by AilinKid.

@hawkingrei
Copy link
Member Author

/retest

@hawkingrei hawkingrei added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label May 23, 2024
@ti-chi-bot ti-chi-bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. labels May 23, 2024
@ti-chi-bot ti-chi-bot bot merged commit fe5858b into pingcap:master May 23, 2024
23 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #53495.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request May 23, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request May 23, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #53496.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request May 23, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #53497.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #53498.

ti-chi-bot bot pushed a commit that referenced this pull request May 23, 2024
RidRisR pushed a commit to RidRisR/tidb that referenced this pull request May 27, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jun 4, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jun 28, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR 1690 (22003): constant 9223372036854775808 overflows bigint
4 participants