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

Projects
None yet
5 participants
@qw4990
Copy link
Contributor

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
@zz-jason
Copy link
Member

zz-jason left a comment

LGTM

@qw4990 qw4990 requested review from XuHuaiyu and lamxTyler Apr 11, 2019

@lamxTyler
Copy link
Member

lamxTyler left a comment

LGTM

@lamxTyler lamxTyler added status/LGT2 and removed status/LGT1 labels Apr 11, 2019

@codecov

This comment has been minimized.

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
@lamxTyler

This comment has been minimized.

Copy link
Member

lamxTyler commented Apr 11, 2019

/run-all-tests

@qw4990 qw4990 force-pushed the qw4990:fix_9732 branch from cbdd1a2 to acb2fa8 Apr 11, 2019

@qw4990

This comment has been minimized.

Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

4 similar comments
@qw4990

This comment has been minimized.

Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

@qw4990

This comment has been minimized.

Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

@qw4990

This comment has been minimized.

Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

@qw4990

This comment has been minimized.

Copy link
Contributor Author

qw4990 commented Apr 11, 2019

/run-all-tests

@zhouqiang-cl

This comment has been minimized.

Copy link
Member

zhouqiang-cl commented Apr 11, 2019

/run-common-test

@qw4990

This comment has been minimized.

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

6 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/code_coverage Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.