-
Notifications
You must be signed in to change notification settings - Fork 481
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
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 #5364
Draft
percona-ysorokin
wants to merge
8
commits into
percona:release-8.0.37-29
Choose a base branch
from
percona-ysorokin:dev/PS-9237-default_collation_for_utf8mb4
base: release-8.0.37-29
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a39be6d
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 …
percona-ysorokin 873c1eb
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 …
percona-ysorokin da0002b
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 …
percona-ysorokin 06da781
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 …
percona-ysorokin 3041e9a
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 …
percona-ysorokin ccb29cc
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 …
percona-ysorokin e5dc3bf
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 …
percona-ysorokin bfc10f2
PS-9237 feature: Include support for utf8mb4_0900_ai_ci in MySQL 5.7 …
percona-ysorokin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As far as I can see in other places where we check if default_collation_for_utf8mb4 needs to kick in (e.g. see sql_lex.cc) we directly use my_charset_utf8mb4_0900_ai_ci instead of getting access to it though get_charset_by_csname().
IMO it makes sense to be consistent and do the same here... Especially since this code seems to be called for each connect so saving even a few CPU cycles would be nice.
What do you think?
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.
Also I think that instead of two ifs you can simply do:
What do you think?
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.
Yes, @dlenev I had exactly the same doubts and was going back and forth with this. From one side I did not want to hardcode
primary_utf8mb4_collation
to bemy_charset_utf8mb4_0900_ai_ci
(because who knows may be in the next version the default collation will change again). On the other hand, I totally agree that establishing the connection is a critical path and we should not add any unnecessary cycles here.Anyway, if this caught your attention as well, then it is probably more serious than I thought.
Let's wait for the final feedback from the customer and I will add the changes you suggested into the final patch.
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.
@dlenev I reworked the critical paths code with simplified versions
that does not involve charset by name lookup.