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 issue that date_add and date_sub is incompatible with MySQL #9702

Merged
merged 8 commits into from
Mar 29, 2019

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Mar 13, 2019

What problem does this PR solve?

fix #9667

What is changed and how it works?

Check if it datetime if overflow when date_add and date_sub.

Check List

Tests

  • Unit test

@codecov
Copy link

codecov bot commented Mar 13, 2019

Codecov Report

Merging #9702 into master will increase coverage by 0.0783%.
The diff coverage is 39.0243%.

@@               Coverage Diff               @@
##             master     #9702        +/-   ##
===============================================
+ Coverage   77.4687%   77.547%   +0.0783%     
===============================================
  Files           404       404                
  Lines         81682     81722        +40     
===============================================
+ Hits          63278     63373        +95     
+ Misses        13688     13648        -40     
+ Partials       4716      4701        -15

types/time.go Outdated Show resolved Hide resolved
types/time.go Outdated Show resolved Hide resolved
types/time.go Outdated Show resolved Hide resolved
@XuHuaiyu XuHuaiyu changed the title expression: Fix issue that date_add and date_sub is incompatible with Mysql expression: fix issue that date_add and date_sub is incompatible with Mysql Mar 15, 2019
@XuHuaiyu XuHuaiyu changed the title expression: fix issue that date_add and date_sub is incompatible with Mysql expression: fix issue that date_add and date_sub is incompatible with MySQL Mar 15, 2019
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.

LGTM

@lzmhhh123 lzmhhh123 added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 22, 2019
@qw4990
Copy link
Contributor Author

qw4990 commented Mar 28, 2019

/run-all-tests

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented Mar 28, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Mar 28, 2019

/rebuild

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented Mar 28, 2019

/rebuild

@qw4990
Copy link
Contributor Author

qw4990 commented Mar 28, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Mar 29, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Mar 29, 2019

PTAL @lamxTyler

types/errors.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

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

LGTM

@alivxxx alivxxx added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 29, 2019
@qw4990
Copy link
Contributor Author

qw4990 commented Mar 29, 2019

/run-all-tests

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented Mar 29, 2019

/run-all-tests

@qw4990 qw4990 merged commit 94f163d into pingcap:master Mar 29, 2019
qw4990 added a commit to qw4990/tidb that referenced this pull request Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function date_add and date_sub don't check datetime field overflow
4 participants