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

fix the STR_TO_DATE incompatible between MySQL and TiDB (#12623) #12726

Merged
merged 3 commits into from Oct 16, 2019

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Oct 15, 2019

cherry-pick #12623 to release-3.1


Signed-off-by: Lonng heng@lonng.org

What problem does this PR solve?

The result of select str_to_date('20190101','%Y%m%d%H%i%s') is incompitable between MySQL and TiDB.

MySQL

mysql> select str_to_date('20190101','%Y%m%d%H%i%s');
+----------------------------------------+
| str_to_date('20190101','%Y%m%d%H%i%s') |
+----------------------------------------+
| 2019-01-01 00:00:00                    |
+----------------------------------------+
1 row in set (0.01 sec)

TiDB

mysql> select str_to_date('20190101','%Y%m%d%H%i%s');
+----------------------------------------+
| str_to_date('20190101','%Y%m%d%H%i%s') |
+----------------------------------------+
| NULL                                   |
+----------------------------------------+
1 row in set (0.01 sec)

What is changed and how it works?

Fix it.

Check List

Tests

  • Unit test

Release note

  • fix the STR_TO_DATE incompatible between MySQL and TiDB

Signed-off-by: Lonng <heng@lonng.org>
Signed-off-by: Lonng <heng@lonng.org>
Signed-off-by: Lonng <heng@lonng.org>
@sre-bot
Copy link
Contributor Author

sre-bot commented Oct 15, 2019

/run-all-tests

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 15, 2019
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

LGTM

@lonng lonng added the status/can-merge Indicates a PR has been approved by a committer. label Oct 16, 2019
@sre-bot
Copy link
Contributor Author

sre-bot commented Oct 16, 2019

Sorry @lonng, you don't have permission to trigger auto merge event on this branch.

@lonng lonng added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. status/PTAL labels Oct 16, 2019
@ngaut ngaut merged commit 81c8680 into pingcap:release-3.1 Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants