Skip to content

expression: the quote function should treat null expr as NULL literal string instead of NULL (#11592)#13681

Merged
zz-jason merged 4 commits intopingcap:release-2.1from
SunRunAway:automated-cherry-pick-of-#11592-upstream-release-2.1
Nov 26, 2019
Merged

expression: the quote function should treat null expr as NULL literal string instead of NULL (#11592)#13681
zz-jason merged 4 commits intopingcap:release-2.1from
SunRunAway:automated-cherry-pick-of-#11592-upstream-release-2.1

Conversation

@SunRunAway
Copy link
Contributor

Automated cherry pick of #11592 on release-2.1.


What problem does this PR solve?

Fix #11556 QUOTE(null) should return 'NULL' string instead of NULL value

What is changed and how it works?

if the expr is NULL, then the value for quote(expr) will be "NULL" instead of NULL.

Check List

Tests

  • Unit test - added more cases.

Side effects

  • Increased code complexity - maybe difficult to understand. but that's just what mysql does.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 22, 2019
Copy link
Contributor

@aytrack aytrack left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. status/can-merge Indicates a PR has been approved by a committer. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 25, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 25, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Nov 25, 2019

@SunRunAway merge failed.

@qw4990 qw4990 removed their request for review November 26, 2019 07:36
@SunRunAway
Copy link
Contributor Author

/run-unit-test

@zz-jason zz-jason merged commit 9a4e89a into pingcap:release-2.1 Nov 26, 2019
@SunRunAway SunRunAway deleted the automated-cherry-pick-of-#11592-upstream-release-2.1 branch November 26, 2019 10:57
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.

5 participants