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

Fix function mod decimal scale overflow (#2462) #2609

Closed

Conversation

ti-srebot
Copy link
Collaborator

@ti-srebot ti-srebot commented Aug 6, 2021

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

# In tics repo:
git pr https://github.com/pingcap/tics/pull/2609

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

git push git@github.com:ti-srebot/tics.git pr/2609:release-5.1-c407b167cfba

What problem does this PR solve?

Problem Summary: #2402 (issue #2318) will overflow in decimal modulo.

What is changed and how it works?

What's Changed: This PR fixes the issue by assign modulo operation to need_promote_type in DecimalBinaryOperation.

Related changes

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

Check List

Tests

  • Unit test

Side effects

Release note

  • Fix an overflow bug in decimal MOD(N, M).

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot added CHERRY-PICK cherry pick type/bug-fix PR that fixes a bug labels Aug 6, 2021
@ti-srebot ti-srebot added this to the v5.1.2 milestone Aug 6, 2021
@JaySon-Huang JaySon-Huang modified the milestones: v5.1.2, v5.1.3 Oct 11, 2021
@fuzhe1989 fuzhe1989 closed this Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CHERRY-PICK cherry pick type/bug-fix PR that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants