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,types: improve `str_to_date` builtin function compatibility #9617

Merged
merged 4 commits into from Mar 9, 2019

Conversation

Projects
None yet
4 participants
@tiancaiamao
Copy link
Contributor

tiancaiamao commented Mar 8, 2019

What problem does this PR solve?

mysql:

mysql> select str_to_date('10/28/2011 9:46:29 Am','%m/%d/%Y %l:%i:%s %p');
+-------------------------------------------------------------+
| str_to_date('10/28/2011 9:46:29 Am','%m/%d/%Y %l:%i:%s %p') |
+-------------------------------------------------------------+
| 2011-10-28 09:46:29                                         |
+-------------------------------------------------------------+
1 row in set (0.00 sec)

tidb:

mysql> select str_to_date('10/28/2011 9:46:29 Am','%m/%d/%Y %l:%i:%s %p');
+-------------------------------------------------------------+
| str_to_date('10/28/2011 9:46:29 Am','%m/%d/%Y %l:%i:%s %p') |
+-------------------------------------------------------------+
| NULL                                                        |
+-------------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

%p formator should accept both AM/PM and am/pm, it's case insensitive

What is changed and how it works?

Tiny fix

Check List

Tests

  • Unit test
expression,types: improve str_to_date builtin function compatibility
%p formator should accept both AM/PM and am/pm, it's case insensitive
@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

tiancaiamao commented Mar 8, 2019

@codecov

This comment has been minimized.

Copy link

codecov bot commented Mar 8, 2019

Codecov Report

Merging #9617 into master will increase coverage by 0.0016%.
The diff coverage is 57.1428%.

@@               Coverage Diff                @@
##             master      #9617        +/-   ##
================================================
+ Coverage   67.3832%   67.3849%   +0.0016%     
================================================
  Files           374        374                
  Lines         78938      78942         +4     
================================================
+ Hits          53191      53195         +4     
  Misses        20994      20994                
  Partials       4753       4753

@xiekeyi98 xiekeyi98 referenced this pull request Mar 8, 2019

Merged

build:add codecov.yml #9618

@shenli

This comment has been minimized.

Copy link
Member

shenli commented Mar 8, 2019

LGTM
Please add labels for this PR.

@tiancaiamao tiancaiamao force-pushed the tiancaiamao:str-to-date branch from 0550028 to b187b15 Mar 9, 2019

@lysu

lysu approved these changes Mar 9, 2019

Copy link
Member

lysu left a comment

LGTM

@lysu lysu added the status/LGT2 label Mar 9, 2019

@lysu

This comment has been minimized.

Copy link
Member

lysu commented Mar 9, 2019

/run-all-tests

@zz-jason zz-jason merged commit 7072052 into pingcap:master Mar 9, 2019

8 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 57.1428% of diff hit (target 0%)
Details
codecov/project 67.3849% (+0.0016%) compared to c0ca027
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

@tiancaiamao tiancaiamao deleted the tiancaiamao:str-to-date branch Mar 9, 2019

ngaut added a commit that referenced this pull request Mar 20, 2019

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.