This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
mydump: added character-set
config to control schema decoding behavior
#83
Merged
Conversation
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
Hi contributor, thanks for your PR. This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically. |
ac4b07b
to
3ca4246
Compare
/run-all-tests |
Lemme DNM it until #82 is merged to get a more reliable test result. |
3ca4246
to
c796e4e
Compare
/run-all-tests |
LGTM |
please resove conflict |
c796e4e
to
8e7e0d0
Compare
/run-all-tests |
@GregoryIan Resolved conflicts |
IANTHEREAL
reviewed
Nov 28, 2018
// perform `chardet` first. | ||
fallthrough | ||
case "gb18030": | ||
decoded, err := simplifiedchinese.GB18030.NewDecoder().Bytes(data) |
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.
add log convert to what, for unexpected error (not here)
IANTHEREAL
reviewed
Nov 28, 2018
lightning/mydump/reader.go
Outdated
func decodeCharacterSet(data []byte, characterSet string) ([]byte, error) { | ||
switch characterSet { | ||
case "binary": | ||
default: |
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.
default auto
, how about make it deterministic
IANTHEREAL
reviewed
Nov 28, 2018
Rest LGTM |
/run-all-tests @GregoryIan PTAL again |
LGTM |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What problem does this PR solve?
https://internal.pingcap.net/jira/browse/TOOL-489
Allow the user to choose the encoding of the schema files.
What is changed and how it works?
Added the
[mydumper] character-set
key (values can be one of:auto
,utf8mb4
,gb18030
orbinary
).Changed the old character auto-detection code to respect this new user setting.
Check List
Tests
Code changes
Side effects
Related changes