-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 a bug caused by the wrong collation setting which leads to the wrong result of collation function #17116
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17116 +/- ##
===========================================
Coverage 80.9240% 80.9240%
===========================================
Files 511 511
Lines 144863 144863
===========================================
Hits 117229 117229
Misses 18658 18658
Partials 8976 8976 |
var ok bool | ||
var charsetVal string | ||
var err2 error | ||
if name == CollationConnection { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a switch
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double switch
makes the code complicated.
I think it's fine since there are only three branches. If four, then I will use switch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@wjhuang2016 merge failed. |
/run-unit-test |
/merge |
/run-all-tests |
/merge |
/run-all-tests |
/merge |
/run-all-tests |
/merge |
@wjhuang2016 merge failed. |
/run-all-tests |
Signed-off-by: sre-bot <[email protected]>
cherry pick to release-4.0 in PR #17231 |
… wrong result of collation function (#17116) (#17231) Signed-off-by: sre-bot <[email protected]>
What problem does this PR solve?
Issue Number: close #17115
Problem Summary:
collation_connection
if the collate is illegal.collation
function shouldn't use the argument's collation, or it will lead to unreadable binary output if the collation isbinary
.What is changed and how it works?
collation_connection
forcollation
function.Related changes
Check List
Tests
Side effects
Release note