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) #2608

Closed

Conversation

ti-srebot
Copy link
Collaborator

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

cherry-pick #2462 to release-5.0
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/2608

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

git push git@github.com:ti-srebot/tics.git pr/2608:release-5.0-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/bugfix This PR fixes a bug. labels Aug 6, 2021
@ti-srebot ti-srebot added this to the v5.0.4 milestone Aug 6, 2021
@windtalker
Copy link
Contributor

close as it is not needed in 5.0.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CHERRY-PICK cherry pick type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants