-
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
types: fix return err when decimal from string value #22407
types: fix return err when decimal from string value #22407
Conversation
@wshwsh12 PTAL |
@XuHuaiyu PTAL |
@ti-srebot /run-all-tests |
…ing_to_decimal_err
59092a5
to
099b323
Compare
hi, could you please add the |
@xiongjiwei PTAL
But the pr #22507 didn't consider the situation like below. I test in the master branch.
|
@AilinKid PTAL |
@lysu PTAL |
tk.MustExec("use test") | ||
tk.MustExec("drop table if exists t") | ||
tk.MustExec("create table t (id decimal(10))") | ||
tk.MustGetErrCode("insert into t values('1sdf')", errno.ErrTruncatedWrongValueForField) |
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.
we can add more tests here to simplify the coverage.
eg: for the line you remove in L424, the '12e-3', '12A' should be added. and seems we need a warning for the latter.
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.
Done. PTAL~ Thx.
/cc @AilinKid @xiongjiwei Conflict resolved, please take a look >_< |
/cc @xiongjiwei @xhebox @wjhuang2016 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 457b905
|
/run-check_dev_2 |
What problem does this PR solve?
Issue Number: close #22394
Problem Summary:
What is changed and how it works?
What's Changed:
When string value to decimal not meet word
e/E
. Report ErrTruncated.How it Works:
Related changes
Check List
Tests
Side effects
Release note