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

types: fix a bug in decimal modulo operation #7113

Merged
merged 5 commits into from
Jul 26, 2018

Conversation

bb7133
Copy link
Member

@bb7133 bb7133 commented Jul 20, 2018

What have you changed? (mandatory)

Fixed a bug in decimal modulo operation(doDivMod in types/mydecimal.go):

(Before this PR):

mysql> select 0.0000000001 mod 1.0;
+----------------------+
| 0.0000000001 mod 1.0 |
+----------------------+
|         0.1000000000 |
+----------------------+
1 row in set (0.00 sec)

(After this PR):

mysql> select 0.0000000001 mod 1.0;
+----------------------+
| 0.0000000001 mod 1.0 |
+----------------------+
|         0.0000000001 |
+----------------------+
1 row in set (0.00 sec)

What is the type of the changes? (mandatory)

Bug fix

How has this PR been tested? (mandatory)

Added 1 UT case

Does this PR affect documentation (docs/docs-cn) update? (mandatory)

No

Does this PR affect tidb-ansible update? (mandatory)

No

Does this PR need to be added to the release notes? (mandatory)

No

Refer to a related PR or issue link (optional)

Corresponding bug-fix at TiKV side: tikv/tikv#3336

@shenli shenli added component/expression type/bugfix This PR fixes a bug. contribution This PR is from a community contributor. labels Jul 20, 2018
@shenli
Copy link
Member

shenli commented Jul 20, 2018

@bb7133 Thanks!

@shenli
Copy link
Member

shenli commented Jul 20, 2018

/run-all-tests

@jackysp
Copy link
Member

jackysp commented Jul 20, 2018

/run-unit-test

@shenli
Copy link
Member

shenli commented Jul 20, 2018

@coocood PTAL

@coocood
Copy link
Member

coocood commented Jul 24, 2018

LGTM
@bb7133
Thank you

@coocood coocood added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 24, 2018
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 25, 2018
@zz-jason
Copy link
Member

/run-all-tests

@zz-jason zz-jason merged commit 417f582 into pingcap:master Jul 26, 2018
@bb7133 bb7133 deleted the bb7133/fix_decimal branch July 28, 2018 07:59
coocood pushed a commit to coocood/tidb that referenced this pull request Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression contribution This PR is from a community contributor. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants