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

ddl: support altering the other charset to utf8 or utf8mb4 #8037

Merged
merged 28 commits into from Dec 10, 2018

Conversation

@winkyao
Copy link
Member

commented Oct 24, 2018

What problem does this PR solve?

fix #7920.

Support changing the other charset to utf8 or utf8mb4.

Rules is:

  1. change any other charset to utf8mb4 is permitted, because TiDB treat all data as utf8mb4
  2. change any other charset to utf8 is permitted, except utf8mb4.

Before this PR, alter table charset take no effects, we just parse it and ignore, in this PR, we change the charset and collate of tableInfo in the infoSchema.

Tests

  • Unit test
  • Integration test

Code changes

  • Has exported function/method change

Side effects

  • Increased code complexity

Related changes

  • Need to update the documentation
  • Need to be included in the release note

This change is Reviewable

@winkyao winkyao changed the title ddl: support alter the other charset to utf8 or utf8mb4 ddl: support altering the other charset to utf8 or utf8mb4 Oct 24, 2018

@winkyao winkyao force-pushed the winkyao:support_change_charset_utf8 branch from 27f5ca0 to e882210 Oct 24, 2018

winkyao added some commits Oct 24, 2018

@shenli

This comment has been minimized.

Copy link
Member

commented Oct 28, 2018

Please resolve the conflicts.

@winkyao

This comment has been minimized.

Copy link
Member Author

commented Nov 5, 2018

Ci will be fixed, after the pr pingcap/parser#14 merged.

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

commented Nov 12, 2018

winkyao added some commits Nov 12, 2018

@winkyao winkyao dismissed a stale review via bc7b5e3 Dec 3, 2018

winkyao added some commits Dec 3, 2018

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2018

winkyao added some commits Dec 4, 2018

@winkyao

This comment has been minimized.

Copy link
Member Author

commented Dec 7, 2018

@zimulala PTAL

winkyao added some commits Dec 7, 2018

@ciscoxll
Copy link
Contributor

left a comment

Mostly LGTM

@ciscoxll
Copy link
Contributor

left a comment

LGTM

@ciscoxll ciscoxll added status/LGT2 and removed status/LGT1 labels Dec 7, 2018

Show resolved Hide resolved ddl/ddl_api.go Outdated
Show resolved Hide resolved ddl/ddl_api.go
@winkyao

This comment has been minimized.

Copy link
Member Author

commented Dec 7, 2018

@zimulala PTAL

@zimulala
Copy link
Member

left a comment

LGTM

@zimulala zimulala added status/LGT3 and removed status/LGT2 labels Dec 10, 2018

@zimulala

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

/run-all-tests

@winkyao

This comment has been minimized.

Copy link
Member Author

commented Dec 10, 2018

/run-common-test -tidb-test=pr/684

1 similar comment
@zhouqiang-cl

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

/run-common-test -tidb-test=pr/684

@winkyao

This comment has been minimized.

Copy link
Member Author

commented Dec 10, 2018

/run-integration-ddl-test -tidb-test=pr/684

@winkyao

This comment has been minimized.

Copy link
Member Author

commented Dec 10, 2018

/run-integration-common-test -tidb-test=pr/684

@winkyao

This comment has been minimized.

Copy link
Member Author

commented Dec 10, 2018

/run-integration-compatibility-test -tidb-test=pr/684

@winkyao winkyao merged commit 1d7d01c into pingcap:master Dec 10, 2018

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@winkyao winkyao deleted the winkyao:support_change_charset_utf8 branch Dec 10, 2018

iamzhoug37 added a commit to iamzhoug37/tidb that referenced this pull request Dec 13, 2018

crazycs520 added a commit to crazycs520/tidb that referenced this pull request Jan 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.