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 inaccurate error info for year column out of range #18871

Merged
merged 7 commits into from
Sep 23, 2020

Conversation

xiaodong-ji
Copy link
Contributor

@xiaodong-ji xiaodong-ji commented Jul 30, 2020

What problem does this PR solve?

Issue Number: close #18792

Problem Summary:
Inaccurate error info for year column out of range.

What is changed and how it works?

What's Changed:
Modified return error type as overflow.

Check List

Tests

  • Manual test
tidb> create table t (a year)
tidb> insert into t values(2156)
ERROR 1264 (22003): Out of range value for column 'a' at row 1
  • Unit test

Release note

  • Fix inaccurate error info for year column out of range.

@xiaodong-ji xiaodong-ji requested a review from a team as a code owner July 30, 2020 01:52
@xiaodong-ji xiaodong-ji requested review from qw4990 and removed request for a team July 30, 2020 01:52
@ti-srebot ti-srebot added the contribution This PR is from a community contributor. label Jul 30, 2020
@codecov
Copy link

codecov bot commented Jul 30, 2020

Codecov Report

Merging #18871 into master will increase coverage by 0.0123%.
The diff coverage is 100.0000%.

@@               Coverage Diff                @@
##             master     #18871        +/-   ##
================================================
+ Coverage   79.1180%   79.1303%   +0.0123%     
================================================
  Files           547        545         -2     
  Lines        147778     147113       -665     
================================================
- Hits         116919     116411       -508     
+ Misses        21383      21282       -101     
+ Partials       9476       9420        -56     

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

Almost LGTM.
Please add the case in #18792 as a unit test. @xiaodong-ji

@xiaodong-ji
Copy link
Contributor Author

PTAL @qw4990 I've added a unit test.

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 15, 2020
@xiaodong-ji
Copy link
Contributor Author

PTAL @SunRunAway

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.

Almost LGTM

executor/insert_test.go Show resolved Hide resolved
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

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Sep 23, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Sep 23, 2020
@wshwsh12
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 23, 2020
@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 19991

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@xiaodong-ji merge failed.

@xiaodong-ji
Copy link
Contributor Author

/run-check_dev_2

@wshwsh12
Copy link
Contributor

/run-all-tests

@xiaodong-ji
Copy link
Contributor Author

/run-unit-test

@wshwsh12 wshwsh12 merged commit 6271bd4 into pingcap:master Sep 23, 2020
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Sep 23, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-3.0 in PR #20169

ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Sep 23, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #20170

ti-srebot added a commit that referenced this pull request Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/executor component/expression contribution This PR is from a community contributor. sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inaccurate error info for year column out of range
5 participants