-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
dev/faq/upgrade.md
Outdated
@@ -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。 |
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.
- 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。 |
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.
done. thanks.
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
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
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
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
TOC.md
title
in metadataTOC.md