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

types: fix incompatible result of DATE_ADD() (#19880) #20627

Merged
merged 9 commits into from
Nov 12, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #19880 to release-3.0


What problem does this PR solve?

Issue Number: close #11645

Problem Summary:
The SQL select DATE_ADD('2007-03-28 22:08:28',INTERVAL "-2.-2" SECOND); is incorrect.

What is changed and how it works?

What's Changed:
change the parse of the fraction part number.

How it Works:

select DATE_ADD('2007-03-28 22:08:28',INTERVAL "-2.-2" SECOND);
+---------------------------------------------------------+
| DATE_ADD('2007-03-28 22:08:28',INTERVAL "-2.-2" SECOND) |
+---------------------------------------------------------+
| 2007-03-28 22:08:26                                     |
+---------------------------------------------------------+

Release note

  • Fix the result of SQL select DATE_ADD('2007-03-28 22:08:28',INTERVAL "-2.-2" SECOND) to be same with the MySQL;

Check List

Tests

  • Unit test

Side effects
Nothing.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@wshwsh12 wshwsh12 removed their request for review October 26, 2020 06:23
@wshwsh12 wshwsh12 self-assigned this Oct 26, 2020
@XuHuaiyu XuHuaiyu removed their request for review October 27, 2020 05:43
@wjhuang2016 wjhuang2016 removed the sig/sql-infra SIG: SQL Infra label Nov 3, 2020
Copy link
Contributor

@ichn-hu ichn-hu left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 12, 2020
Copy link
Contributor

@wshwsh12 wshwsh12 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 12, 2020
@wshwsh12
Copy link
Contributor

/merge

@ti-srebot
Copy link
Contributor Author

Sorry @wshwsh12, this branch cannot be merged without an approval of release maintainers

@bb7133
Copy link
Member

bb7133 commented Nov 12, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Sorry @bb7133, this branch cannot be merged without an approval of release maintainers

@ti-srebot ti-srebot added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Nov 12, 2020
@ti-srebot ti-srebot added status/LGT4 The PR has already had 4 LGTM. and removed status/LGT3 The PR has already had 3 LGTM. labels Nov 12, 2020
@SunRunAway
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 12, 2020
@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 20828
  • 20424

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@bb7133
Copy link
Member

bb7133 commented Nov 12, 2020

/run-integration-common-test

@bb7133
Copy link
Member

bb7133 commented Nov 12, 2020

/merge

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@wshwsh12
Copy link
Contributor

/run-unit-test

@bb7133
Copy link
Member

bb7133 commented Nov 12, 2020

/merge

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit 3f28de5 into pingcap:release-3.0 Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config component/expression contribution This PR is from a community contributor. sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. status/LGT4 The PR has already had 4 LGTM. type/3.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants