-
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
dumpling: add collation_compatible config in dumpling #31114
dumpling: add collation_compatible config in dumpling #31114
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/component dumpling |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/55f758e579a4c55aed92f0aa4d1e1439988057e1 |
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.
Is it possible to add a unit test/integration test for this method?
Maybe move |
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
@@ -443,7 +452,10 @@ func adjustDatabaseCollation(tctx *tcontext.Context, parser *parser.Parser, orig | |||
} | |||
|
|||
// adjustTableCollation adjusts table collation | |||
func adjustTableCollation(tctx *tcontext.Context, parser *parser.Parser, originSQL string, charsetAndDefaultCollationMap map[string]string) (string, error) { | |||
func adjustTableCollation(tctx *tcontext.Context, collationCompatible string, parser *parser.Parser, originSQL string, charsetAndDefaultCollationMap map[string]string) (string, error) { | |||
if collationCompatible != StrictCollationCompatible { |
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.
maybe do this check out of adjustTableCollation? not strong , current code lgtm too
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, i do this like that before, but i find it is maybe hard to add UT for this config, because the judgement will be in dumpDatabases
.
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.
ok, maybe we can enhance this later, because codefreeze is coming, i will merge this pr first
/merge |
@WizardXiao: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Please help merge this pr, if there is no other conversation. thank you. @lichunzhu |
/run-integration-dumpling-test |
will merge this pr after dumpling it test passed |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: e3ef220
|
/run-check_dev_2 |
/run-unit-test |
/run-check_dev_2 |
[FORMAT CHECKER NOTIFICATION] Notice: Please provide the linked issue number on one line in the PR body, for example: 📖 For more info, you can check the "Contribute Code" section in the development guide. |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.3 in PR #31777 |
What problem does this PR solve?
Issue Number: close #3420
Problem Summary:
See #3420.
What is changed and how it works?
add config
collation_compatible
in dumpling.default loose handle create sql by original sql, will not add default collation as upstream.
strict will add default collation as upstream, and downstream will occur error when downstream don't support
Check List
Tests
Documentation
Release note