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

Function SUBTIME ADDTIME should return NULL with a warning if its argument is an invalid time value. #11262

Merged
merged 3 commits into from
Jul 19, 2019

Conversation

tcmichael
Copy link

@tcmichael tcmichael commented Jul 15, 2019

What problem does this PR solve?

Function SUBTIME ADDTIME should return NULL with a warning if its argument is an invalid time value.
Closes #11175

What is changed and how it works?

ignores ErrTruncatedWrongVal.

Check List

Tests

  • Unit test
  • Integration test

@codecov
Copy link

codecov bot commented Jul 15, 2019

Codecov Report

Merging #11262 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11262   +/-   ##
===========================================
  Coverage   81.3855%   81.3855%           
===========================================
  Files           423        423           
  Lines         90607      90607           
===========================================
  Hits          73741      73741           
  Misses        11570      11570           
  Partials       5296       5296

@tcmichael tcmichael changed the title Function SUBTIME should return NULL with a warning if its argument is an invalid time value. Function SUBTIME ADDTIME should return NULL with a warning if its argument is an invalid time value. Jul 15, 2019
@tcmichael
Copy link
Author

@SunRunAway PTAL

expression/integration_test.go Show resolved Hide resolved
expression/builtin_time.go Show resolved Hide resolved
@tcmichael
Copy link
Author

@SunRunAway PTAL

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@tcmichael tcmichael force-pushed the bugfix-11175 branch 2 times, most recently from 6b4cbbe to 364b912 Compare July 16, 2019 07:06
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

@tcmichael Should we also consider other types of builtin_time like builtinSubStringAndDurationSig?

@tcmichael tcmichael force-pushed the bugfix-11175 branch 2 times, most recently from efe6269 to 6b8f90f Compare July 19, 2019 02:58
@tcmichael
Copy link
Author

@lzmhhh123 I tried to find out the functions of the same case, hoping that I found them all.

Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

@tcmichael Nice job! LGTM.

@lzmhhh123
Copy link
Contributor

@SunRunAway Please take a look. If ok, disable the change requested.

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@SunRunAway
Copy link
Contributor

/run-all-tests

@SunRunAway
Copy link
Contributor

/run-all-tests

@lzmhhh123 lzmhhh123 merged commit d977edf into pingcap:master Jul 19, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Jul 19, 2019

cherry pick to release-2.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Jul 19, 2019

cherry pick to release-3.0 in PR #11337

@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

It seems that, not for sure, we failed to cherry-pick this commit to release-2.1. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @SunRunAway PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression contribution This PR is from a community contributor. type/bugfix This PR fixes a bug. type/compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function SUBTIME should return NULL with a warning if its argument is an invalid time value.
5 participants