-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: handle ErrTruncated when dividing decimals in non-data-change stmts #14438
Conversation
/run-all-tests |
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.
Please fix the test case.
/run-all-tests |
/rebuild |
/run-all-tests |
2 similar comments
/run-all-tests |
/run-all-tests |
/run-unit-test |
@SunRunAway @XuHuaiyu @wshwsh12 All CI problems have been resolved, PTAL~! |
MySQL works fine... tidb> create table t(a int);
Query OK, 0 rows affected (0.01 sec)
tidb> insert into t values(cast(1 as decimal(60,30)) / cast(3 as decimal(60,30)) / cast(3 as decimal(60, 30)));
ERROR 1292 (22007): Truncated incorrect DECIMAL value: '0.111111111111111111111111111111' |
What's the version of your MySQL? In my MySQL 8x, the result is below:
|
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 |
@qw4990 merge failed. |
/run-unit-test |
/run-all-tests |
19d096f
to
899bee4
Compare
/run-all-tests |
1 similar comment
/run-all-tests |
cherry pick to release-3.0 failed |
It seems that, not for sure, we failed to cherry-pick this commit to release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @qw4990 PTAL. |
What problem does this PR solve?
Handle ErrTruncated when dividing decimals.
Before this PR:
After this PR:
In MySQL:
Check List
Tests