Skip to content

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

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

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

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-6.5 This PR is cherry-picked to release-6.5 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 ti-chi-bot bot added the lgtm label 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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label 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:19:15.590774703 +0000 UTC m=+963517.781643692: ☑️ agreed by gengliqi.
  • 2024-11-19 14:02:07.989698353 +0000 UTC m=+969690.180567345: ☑️ agreed by breezewish.

@gengliqi
Copy link
Member

/retest

1 similar comment
@gengliqi
Copy link
Member

/retest

@ti-chi-bot ti-chi-bot bot merged commit b71614c into tikv:release-6.5 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-6.5 This PR is cherry-picked to release-6.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants