Skip to content

expression: fix issue that date_add and date_sub is incompatible with MySQL#9702

Merged
qw4990 merged 8 commits intopingcap:masterfrom
qw4990:fix_9667
Mar 29, 2019
Merged

expression: fix issue that date_add and date_sub is incompatible with MySQL#9702
qw4990 merged 8 commits intopingcap:masterfrom
qw4990:fix_9667

Conversation

@qw4990
Copy link
Copy Markdown
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
Copy Markdown

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

Comment thread types/time.go Outdated
Comment thread types/time.go Outdated
Comment thread types/time.go Outdated
@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
Copy Markdown
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
Copy Markdown
Contributor Author

qw4990 commented Mar 28, 2019

/run-all-tests

1 similar comment
@qw4990
Copy link
Copy Markdown
Contributor Author

qw4990 commented Mar 28, 2019

/run-all-tests

@qw4990
Copy link
Copy Markdown
Contributor Author

qw4990 commented Mar 28, 2019

/rebuild

1 similar comment
@qw4990
Copy link
Copy Markdown
Contributor Author

qw4990 commented Mar 28, 2019

/rebuild

@qw4990
Copy link
Copy Markdown
Contributor Author

qw4990 commented Mar 28, 2019

/run-all-tests

@qw4990
Copy link
Copy Markdown
Contributor Author

qw4990 commented Mar 29, 2019

/run-all-tests

@qw4990
Copy link
Copy Markdown
Contributor Author

qw4990 commented Mar 29, 2019

PTAL @lamxTyler

Comment thread types/errors.go Outdated
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

qw4990 commented Mar 29, 2019

/run-all-tests

1 similar comment
@qw4990
Copy link
Copy Markdown
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