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: return correct results for user variables of datetime type #22078

Merged
merged 2 commits into from
Jan 4, 2021

Conversation

eurekaka
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #22077

Problem Summary:

Incorrect results for user variables of datetime type.

What is changed and how it works?

What's Changed:

use ToString() to convert datum from other types to string type, instead of GetString().

How it Works:

See code comments.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

N/A

Release note

  • return correct results for user variables of datetime type

@eurekaka eurekaka requested a review from a team as a code owner December 29, 2020 09:43
@eurekaka eurekaka requested review from XuHuaiyu and removed request for a team December 29, 2020 09:43
@eurekaka
Copy link
Contributor Author

/run-all-tests

@bb7133
Copy link
Member

bb7133 commented Dec 30, 2020

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 30, 2020
@ichn-hu ichn-hu mentioned this pull request Jan 2, 2021
Copy link
Contributor

@qw4990 qw4990 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 removed the status/LGT1 Indicates that a PR has LGTM 1. label Jan 4, 2021
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jan 4, 2021
@qw4990
Copy link
Contributor

qw4990 commented Jan 4, 2021

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 21911
  • 22101

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 4, 2021
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #22143

eurekaka added a commit to ti-srebot/tidb that referenced this pull request Jan 4, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
eurekaka added a commit that referenced this pull request Jan 8, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: Kenan Yao <cauchy1992@gmail.com>
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. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

incorrect result for user variables of datetime type
4 participants