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

expression: fix DIV with decimal type (#11804) #11813

Merged
merged 4 commits into from
Aug 21, 2019

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Aug 21, 2019

cherry-pick #11804 to release-3.0


What problem does this PR solve?

Fix this issue(#11180).
operator_div in mysql.
In TiDB, the division operator does not correctly resolve the case that an operand is an unsigned number.

What is changed and how it works?

When evaluating the expression of 'div with decimal type', it will check the operands first.
And do different things depend on whether either of the operands is unsigned.

Check List

Tests

  • Unit test
    add two test cases and pass all the tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Aug 21, 2019

/run-all-tests

Copy link
Contributor

@wshwsh12 wshwsh12 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 merged commit 7f15d28 into pingcap:release-3.0 Aug 21, 2019
@zz-jason zz-jason added the status/LGT2 Indicates that a PR has LGTM 2. label Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants