Skip to content

sql, toc: refine character set and collation document#2884

Merged
TomShawn merged 5 commits into
pingcap:masterfrom
TomShawn:refine-characterset-collation
Apr 29, 2020
Merged

sql, toc: refine character set and collation document#2884
TomShawn merged 5 commits into
pingcap:masterfrom
TomShawn:refine-characterset-collation

Conversation

@TomShawn
Copy link
Copy Markdown
Contributor

@TomShawn TomShawn commented Apr 24, 2020

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

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

  • This PR is translated from:
  • Other reference link(s):

@TomShawn TomShawn added type/enhancement The issue or PR belongs to an enhancement. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. needs-cherry-pick-4.0 labels Apr 24, 2020
@TomShawn TomShawn requested review from wjhuang2016 and yikeke April 24, 2020 10:03
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
### 旧框架下的排序规则支持

在 4.0 版本之前,TiDB 中可以指定大部分 MySQl 中的 Collation,并把这些 Collation 按照默认 Collation 处理,即以编码字节序为字符定序。和 MySQL 不同的是,TiDB 在比较字符前按照 Collation 的 `PADDING` 属性将字符补齐空格,因此会造成以下的行为区别:
在 4.0 版本之前,TiDB 中可以指定大部分 MySQl 中的排序规则,并把这些排序规则按照默认排序规则处理,即以编码字节序为字符定序。和 MySQL 不同的是,TiDB 在比较字符前按照 排序规则 的 `PADDING` 属性将字符补齐空格,因此会造成以下的行为区别:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
在 4.0 版本之前,TiDB 中可以指定大部分 MySQl 中的排序规则,并把这些排序规则按照默认排序规则处理,即以编码字节序为字符定序。和 MySQL 不同的是,TiDB 在比较字符前按照 排序规则 的 `PADDING` 属性将字符补齐空格,因此会造成以下的行为区别:
在 4.0 版本之前,TiDB 中可以指定大部分 MySQL 中的排序规则,并把这些排序规则按照默认排序规则处理,即以编码字节序为字符定序。和 MySQL 不同的是,TiDB 在比较字符前按照排序规则的 `PADDING` 属性将字符补齐空格,因此会造成以下的行为区别:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这里有误,应该是 “TiDB 在比较字符前按照排序规则的 PADDING 属性将字符末尾的空格删除”, 英文版也需要更改。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in #2350.

Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Comment thread reference/sql/characterset-and-collation.md Outdated
Copy link
Copy Markdown
Contributor

@yikeke yikeke left a comment

Choose a reason for hiding this comment

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

Rest LGTM

Comment thread reference/sql/characterset-and-collation.md
Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>
Copy link
Copy Markdown
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@yikeke yikeke left a comment

Choose a reason for hiding this comment

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

LGTM

@TomShawn TomShawn added the status/can-merge Indicates a PR has been approved by a committer. label Apr 29, 2020
@TomShawn TomShawn removed the status/can-merge Indicates a PR has been approved by a committer. label Apr 29, 2020
@TomShawn TomShawn merged commit 4eddc8d into pingcap:master Apr 29, 2020
@pingcap pingcap deleted a comment from sre-bot Apr 29, 2020
@TomShawn TomShawn deleted the refine-characterset-collation branch April 29, 2020 13:13
sre-bot added a commit to sre-bot/docs-cn that referenced this pull request Apr 29, 2020
* sql, toc: refine character set and collation document

* address comments

* address comments

Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>

Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com>
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Copy Markdown
Contributor

sre-bot commented Apr 29, 2020

cherry pick to release-4.0 in PR #2928

TomShawn added a commit that referenced this pull request Apr 29, 2020
* sql, toc: refine character set and collation document

* address comments

* address comments

Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>

Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com>
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>

Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com>
@yikeke
Copy link
Copy Markdown
Contributor

yikeke commented May 13, 2020

This PR‘s commits need to be manually cherry-picked to release-3.1, release-3.0, and release-2.1. @TomShawn will help open the PRs.

rleungx pushed a commit to rleungx/docs-cn that referenced this pull request May 22, 2020
* sql, toc: refine character set and collation document

* address comments

* address comments

Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>

Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com>
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/enhancement The issue or PR belongs to an enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants