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

faq/upgrade: update upgrade faq #1527

Merged
merged 11 commits into from
Jul 10, 2019
Merged

Conversation

crazycs520
Copy link
Contributor

@crazycs520 crazycs520 commented Jun 27, 2019

What is changed, added or deleted?

faq/upgrade: update upgrade faq.

add doc for treat-old-version-utf8-as-utf8mb4 config.

What is the related PR or file link(s)?

pingcap/tidb#9820

Which version does your change affect?

dev, v3.0, v2.1, v2.1-legacy

Checklist

  • Add a new file to TOC.md
  • No Tab spaces anywhere
  • Leave a blank line both before and after a code block
  • Keep the first level heading consistent with title in metadata
  • Use four spaces for each level of indentation except that in TOC.md

@@ -203,3 +203,7 @@ TiDB 在 v2.1.1 及之前版本中,如果 charset 是 UTF8,没有对 4-byte
# Disabled.
set @@session.tidb_check_mb4_value_in_utf8 = 0;
```

- v2.1.7 及之后版本,如果对表和 column 的字符集没有严格的要求为 UTF8,也不想修改客户端代码去跳过 UTF8 检查或者手动修改 column 的 charset,可以在配置文件中把 `treat-old-version-utf8-as-utf8mb4` 打开,这个配置的作用是,把所有字符集为 UTF8 的表和 column 自动在转成 UTF8MB4 的 charset。这个转换是在 TiDB load schema 时在内存中把 UTF8 转成 UTF8MB4,不会对实际存储的数据做任何修改。所以在配置文件中关闭 `treat-old-version-utf8-as-utf8mb4`,重启 TiDB 后,以前字符集为 UTF8 的表和 column 的字符集任然还是 UTF8。
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- v2.1.7 及之后版本,如果对表和 column 的字符集没有严格的要求为 UTF8,也不想修改客户端代码去跳过 UTF8 检查或者手动修改 column 的 charset,可以在配置文件中把 `treat-old-version-utf8-as-utf8mb4` 打开,这个配置的作用是,把所有字符集为 UTF8 的表和 column 自动在转成 UTF8MB4 的 charset。这个转换是在 TiDB load schema 时在内存中把 UTF8 转成 UTF8MB4,不会对实际存储的数据做任何修改。所以在配置文件中关闭 `treat-old-version-utf8-as-utf8mb4`,重启 TiDB 后,以前字符集为 UTF8 的表和 column 的字符集任然还是 UTF8。
- v2.1.7 及之后版本,如果对表和 column 的字符集没有严格的要求为 UTF8,也不想修改客户端代码去跳过 UTF8 检查或者手动修改 column 的 charset,可以在配置文件中把 `treat-old-version-utf8-as-utf8mb4` 打开,这个配置的作用是,把所有字符集为 UTF8 的表和 column 自动在转成 UTF8MB4 的 charset。这个转换是在 TiDB load schema 时在内存中把 UTF8 转成 UTF8MB4,不会对实际存储的数据做任何修改。在配置文件中关闭 `treat-old-version-utf8-as-utf8mb4` 并重启 TiDB 后,以前字符集为 UTF8 的表和 column 的字符集仍然还是 UTF8。

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. thanks.

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

@lilin90 lilin90 requested a review from CaitinChen July 2, 2019 11:01
dev/faq/upgrade.md Outdated Show resolved Hide resolved
v2.1-legacy/op-guide/upgrade-faq.md Outdated Show resolved Hide resolved
dev/faq/upgrade.md Outdated Show resolved Hide resolved
v2.1/faq/upgrade.md Outdated Show resolved Hide resolved
v3.0/faq/upgrade.md Outdated Show resolved Hide resolved
v2.1-legacy/op-guide/upgrade-faq.md Outdated Show resolved Hide resolved
v2.1/faq/upgrade.md Outdated Show resolved Hide resolved
v3.0/faq/upgrade.md Outdated Show resolved Hide resolved
Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

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

LGTM

@lilin90 lilin90 merged commit 9279d87 into pingcap:master Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants