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

expr: fix panic when using radians and degree #17853

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

gengliqi
Copy link
Member

@gengliqi gengliqi commented Nov 19, 2024

What is changed and how it works?

Issue Number: Close #17852

What's Changed:

  1. radians changes from arg * PI / 180 to arg * (PI / 180) to avoid infinite float issues. FYI: https://github.com/mysql/mysql-server/blob/ee079e5ca930ce5ed0643326abadeed8cd41fffc/sql/item_func.h#L1556 MySQL also calculates PI / 180 firstly.
  2. The result of degrees can be infinite so adding a check for it.
expr: fix panic when using radians and degree

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

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

Release note

None

Signed-off-by: gengliqi <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 19, 2024
Signed-off-by: gengliqi <[email protected]>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 19, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: breezewish, overvenus

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:
  • OWNERS [breezewish,overvenus]

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 19, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-19 11:31:56.779323881 +0000 UTC m=+960678.970192877: ☑️ agreed by breezewish.
  • 2024-11-19 11:37:35.256450413 +0000 UTC m=+961017.447319405: ☑️ agreed by overvenus.

@ti-chi-bot ti-chi-bot bot merged commit c2389be into tikv:master Nov 19, 2024
8 checks passed
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Nov 19, 2024
@gengliqi gengliqi added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Nov 19, 2024
@ti-chi-bot
Copy link
Member

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

@gengliqi gengliqi added needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. 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. labels Nov 19, 2024
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

Copy link
Contributor

ti-chi-bot bot commented Nov 19, 2024

@gengliqi: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-unit-test 8b5afa2 link unknown /test pull-unit-test

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

ti-chi-bot bot pushed a commit that referenced this pull request Nov 19, 2024
close #17852

expr: fix panic when using radians and degree

Signed-off-by: gengliqi <[email protected]>

Co-authored-by: gengliqi <[email protected]>
ti-chi-bot bot pushed a commit that referenced this pull request Nov 19, 2024
close #17852

expr: fix panic when using radians and degree

Signed-off-by: gengliqi <[email protected]>

Co-authored-by: gengliqi <[email protected]>
ti-chi-bot bot pushed a commit that referenced this pull request Nov 19, 2024
close #17852

expr: fix panic when using radians and degree

Signed-off-by: gengliqi <[email protected]>

Co-authored-by: gengliqi <[email protected]>
ti-chi-bot bot pushed a commit that referenced this pull request Nov 19, 2024
close #17852

expr: fix panic when using radians and degree

Signed-off-by: gengliqi <[email protected]>

Co-authored-by: gengliqi <[email protected]>
RidRisR pushed a commit to RidRisR/tikv that referenced this pull request Nov 20, 2024
close tikv#17852

expr: fix panic when using radians and degree

Signed-off-by: gengliqi <[email protected]>
ti-chi-bot bot added a commit that referenced this pull request Nov 25, 2024
close #17852

expr: fix panic when using radians and degree

Signed-off-by: gengliqi <[email protected]>

Co-authored-by: gengliqi <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
3AceShowHand pushed a commit to 3AceShowHand/tikv that referenced this pull request Nov 26, 2024
close tikv#17852

expr: fix panic when using radians and degree

Signed-off-by: gengliqi <[email protected]>
Signed-off-by: 3AceShowHand <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. 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. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiKV panic when using radians or degrees
4 participants