Skip to content

expr: fix panic when using radians and degree (#17853)#17859

Merged
ti-chi-bot[bot] merged 2 commits intotikv:release-8.1from
ti-chi-bot:cherry-pick-17853-to-release-8.1
Nov 19, 2024
Merged

expr: fix panic when using radians and degree (#17853)#17859
ti-chi-bot[bot] merged 2 commits intotikv:release-8.1from
ti-chi-bot:cherry-pick-17853-to-release-8.1

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #17853

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 calculate 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 <gengliqiii@gmail.com>
Signed-off-by: gengliqi <gengliqiii@gmail.com>
@ti-chi-bot ti-chi-bot added dco-signoff: yes Indicates the PR's author has signed the dco. 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. type/cherry-pick-for-release-8.1 This PR is cherry-picked to release-8.1 from a source PR. labels Nov 19, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Nov 19, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [breezewish,gengliqi]

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
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-19 12:17:21.090641336 +0000 UTC m=+963403.281510325: ☑️ agreed by gengliqi.
  • 2024-11-19 14:01:53.384461649 +0000 UTC m=+969675.575330656: ☑️ agreed by breezewish.

@ti-chi-bot ti-chi-bot bot merged commit 6ab4b2c into tikv:release-8.1 Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. dco-signoff: yes Indicates the PR's author has signed the dco. lgtm 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. type/cherry-pick-for-release-8.1 This PR is cherry-picked to release-8.1 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants