-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11804 +/- ##
=========================================
Coverage 81.519% 81.519%
=========================================
Files 435 435
Lines 93891 93891
=========================================
Hits 76539 76539
Misses 11883 11883
Partials 5469 5469 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
@Reminiscent merge failed. |
/run-auto-merge |
/run-all-tests |
cherry pick to release-2.1 in PR #11812 |
cherry pick to release-3.0 in PR #11813 |
What problem does this PR solve?
Closes: #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
add two test cases and pass all the tests