Skip to content
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

*: Support modify table/column charset from latin1 to utf8/utf8mb4 #34386

Merged
merged 10 commits into from
May 10, 2022

Conversation

Defined2014
Copy link
Contributor

@Defined2014 Defined2014 commented May 5, 2022

What problem does this PR solve?

Issue Number: ref #34008
Problem Summary: new feature for modify charset from latin1 to utf8/utf8mb4.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

* Let latin1 as an alias for utf8 in tidb
* Support modify table/column charset from latin1 to utf8/utf8mb4

@Defined2014 Defined2014 added the compatibility-breaker Violation of forwards/backwards compatibility in a design-time piece. label May 5, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 5, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • tangenta
  • zimulala

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 5, 2022
@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 5, 2022
@Defined2014
Copy link
Contributor Author

/run-unit-test

@sre-bot
Copy link
Contributor

sre-bot commented May 6, 2022

@Defined2014 Defined2014 changed the title [WIP] *: support modify charset from latin1 to utf8/utf8mb4 *: support modify charset from latin1 to utf8/utf8mb4 May 7, 2022
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 7, 2022
@Defined2014 Defined2014 changed the title *: support modify charset from latin1 to utf8/utf8mb4 *: let latin1 as an alias for utf8 in tidb May 9, 2022
@Defined2014 Defined2014 changed the title *: let latin1 as an alias for utf8 in tidb *: Support modify table/column charset from latin1 to utf8/utf8mb4 May 9, 2022
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 9, 2022
@Defined2014
Copy link
Contributor Author

/run-mysql-test

@Defined2014
Copy link
Contributor Author

/run-mysql-test tidb-test=pr/1696

parser/mysql/charset.go Outdated Show resolved Hide resolved
parser/charset/encoding_latin1.go Outdated Show resolved Hide resolved
parser/charset/encoding_latin1.go Outdated Show resolved Hide resolved
tk.MustGetErrCode("alter table t charset utf8", errno.ErrUnsupportedDDLOperation)
tk.MustGetErrCode("alter table t charset utf8mb4", errno.ErrUnsupportedDDLOperation)
tk.MustGetErrCode("alter table t charset utf8mb4 collate utf8mb4_bin", errno.ErrUnsupportedDDLOperation)
tk.MustExec("alter table t charset utf8")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the check of admin check table t.
And do we need to add some records?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I think with data is covered by collation_misc.test

cmd/explaintest/t/collation_misc.test Show resolved Hide resolved
cmd/explaintest/t/collation_misc.test Show resolved Hide resolved
Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 10, 2022
@zimulala
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: f92dc77

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 10, 2022
@Defined2014
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 10, 2022
@hawkingrei
Copy link
Member

/run-mysql-test

@Defined2014
Copy link
Contributor Author

/merge

@Defined2014
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 10, 2022
@Defined2014
Copy link
Contributor Author

/run-tide

@ti-chi-bot ti-chi-bot merged commit ede6f8c into pingcap:master May 10, 2022
@Defined2014 Defined2014 deleted the fix-34008 branch May 10, 2022 05:00
@sre-bot
Copy link
Contributor

sre-bot commented May 10, 2022

TiDB MergeCI notify

🔴 Bad News! New failing [1] after this pr merged.
These new failed integration tests seem to be caused by the current PR, please try to fix these new failed integration tests, thanks!

CI Name Result Duration Compare with Parent commit
idc-jenkins-ci-tidb/common-test 🟥 failed 1, success 11, total 12 5 min 8 sec New failing
idc-jenkins-ci-tidb/tics-test 🔴 failed 1, success 0, total 1 3 min 41 sec Existing failure
idc-jenkins-ci/integration-cdc-test 🟢 all 34 tests passed 24 min Existing passed
idc-jenkins-ci-tidb/integration-common-test 🟢 all 11 tests passed 10 min Existing passed
idc-jenkins-ci-tidb/sqllogic-test-2 🟢 all 28 tests passed 7 min 14 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-1 🟢 all 26 tests passed 6 min 54 sec Existing passed
idc-jenkins-ci-tidb/integration-ddl-test 🟢 all 6 tests passed 6 min 13 sec Existing passed
idc-jenkins-ci-tidb/mybatis-test 🟢 all 1 tests passed 3 min 31 sec Existing passed
idc-jenkins-ci-tidb/integration-compatibility-test 🟢 all 1 tests passed 3 min 26 sec Existing passed
idc-jenkins-ci-tidb/plugin-test 🟢 build success, plugin test success 4min Existing passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility-breaker Violation of forwards/backwards compatibility in a design-time piece. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants