Skip to content

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

Merged
sre-bot merged 5 commits intopingcap:release-3.0from
sre-bot:release-3.0-5f9fe27a1475
Aug 5, 2019
Merged

expression: the quote function should treat null expr as NULL literal string instead of NULL (#11592)#11619
sre-bot merged 5 commits intopingcap:release-3.0from
sre-bot:release-3.0-5f9fe27a1475

Conversation

@sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Aug 5, 2019

cherry-pick #11592 to release-3.0


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.

@sre-bot
Copy link
Contributor Author

sre-bot commented Aug 5, 2019

/run-all-tests

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 status/LGT1 Indicates that a PR has LGTM 1. status/PTAL labels Aug 5, 2019
Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@SunRunAway SunRunAway added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. status/PTAL labels Aug 5, 2019
@sre-bot
Copy link
Contributor Author

sre-bot commented Aug 5, 2019

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Aug 5, 2019

@sre-bot merge failed.

@zz-jason
Copy link
Member

zz-jason commented Aug 5, 2019

/run-unit-test

@zz-jason
Copy link
Member

zz-jason commented Aug 5, 2019

/rebuild
/run-unit-test

@zz-jason
Copy link
Member

zz-jason commented Aug 5, 2019

/run-auto-merge

@sre-bot
Copy link
Contributor Author

sre-bot commented Aug 5, 2019

/run-all-tests

@sre-bot sre-bot merged commit 4fb7f3f into pingcap:release-3.0 Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/expression contribution This PR is from a community contributor. 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.

4 participants