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 monthname is not compatible with Mysql #10109

Merged
merged 5 commits into from
Apr 11, 2019

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Apr 10, 2019

What problem does this PR solve?

Fix #9732

What is changed and how it works?

Following MySQL's implementation below and document here, Check NoZeroDate after converting string to date in str_to_date.

  if (extract_date_time(&date_time_format, val->ptr(), val->length(), ltime,
                        cached_timestamp_type, 0, "datetime") ||
      ((fuzzy_date & TIME_NO_ZERO_DATE) &&
       (ltime->year == 0 || ltime->month == 0 || ltime->day == 0)))
    goto null_date;

Check List

Tests

  • Unit test

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 10, 2019
@qw4990 qw4990 requested review from XuHuaiyu and alivxxx April 11, 2019 02:28
alivxxx
alivxxx previously approved these changes Apr 11, 2019
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 Apr 11, 2019
@codecov
Copy link

codecov bot commented Apr 11, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@5a34c4b). Click here to learn what that means.
The diff coverage is 33.3333%.

@@             Coverage Diff             @@
##             master     #10109   +/-   ##
===========================================
  Coverage          ?   77.9999%           
===========================================
  Files             ?        405           
  Lines             ?      82136           
  Branches          ?          0           
===========================================
  Hits              ?      64066           
  Misses            ?      13362           
  Partials          ?       4708

@alivxxx
Copy link
Contributor

alivxxx commented Apr 11, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

4 similar comments
@qw4990
Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

@zhouqiang-cl
Copy link
Contributor

/run-common-test

@qw4990
Copy link
Contributor Author

qw4990 commented Apr 11, 2019

CI problems have been resolved, PTAL~ @zz-jason @lamxTyler

@ngaut ngaut merged commit 29e9a41 into pingcap:master Apr 11, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants