ApplySchema vttablet RPC: allow special characters in table and column names#13054
Merged
rohit-nayak-ps merged 1 commit intovitessio:mainfrom May 28, 2023
Merged
Conversation
… table and column names can have special characters Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
mattlord
approved these changes
May 10, 2023
deepthi
approved these changes
May 27, 2023
Contributor
|
I was unable to backport this Pull Request to the following branches: |
4 tasks
dbussink
added a commit
to dbussink/vitess
that referenced
this pull request
Jun 16, 2023
This was using the command line but we can use a proper mysql connection here. Follow up to vitessio#13054 where this was identified. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
dbussink
added a commit
that referenced
this pull request
Jun 17, 2023
This was using the command line but we can use a proper mysql connection here. Follow up to #13054 where this was identified. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
VReplication MoveTables workflows which contain a table name or a column which has special characters (like
öorü) are currently failing. While tracking down the issue it turned out that the target table/column names are being generated with incorrect character mappings.Root Cause
VReplication uses the
tabletmanagersApplySchemaRPC to copy over the schemas from the source to the target.It turns out that
ApplySchemaexecutes the actual ddl using the mysql CLI in themysqlctlpackage!! It is not clear why we are following this approach instead of directly creating it in the tablet like howOnlineDDLdoes it, for example: this code was added way back ~2016. It is possible this is legacy and can be refactored out.This PR sets the default character set in the extra config that is passed on to the CLI (
--default-character-set=utf8mb4) command line argument. An existing e2e test has been updated to use special characters in both table and column names. It was failing before this change and passes with the change.Related Issue(s)
Checklist