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

reference/system-databases: add description for TIDB_ROW_ID_SHARDING_INFO #2237

Merged
merged 4 commits into from
Feb 20, 2020

Conversation

bb7133
Copy link
Member

@bb7133 bb7133 commented Feb 12, 2020

What is changed, added or deleted?

Add description for the new TIDB_ROW_ID_SHARDING_INFO column in information_schema.tables table.

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

Which TiDB version(s) does your changes apply to?

  • All active versions: dev, v3.0, v2.1, v3.1
  • dev (the latest development version)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)
  • v3.1 (TiDB 3.1 versions)
  • v4.0 (TiDB 4.0 versions)
  • All active and inactive versions
  • N/A (not applicable)

Note: If your changes apply to multiple TiDB versions, make sure you update the documents in the corresponding version folders such as "dev", "v3.0", "v2.1" and "v3.1" in this PR.

  • Updated one version first. Will update other versions after I get two LGTMs.

@bb7133 bb7133 added the v4.0 This PR/issue applies to TiDB v4.0. label Feb 12, 2020
@TomShawn TomShawn added dev translation/doing This PR’s assignee is translating this PR. labels Feb 12, 2020
Comment on lines 483 to 488
* `TiDB_TABLE_ID`:标识表的内部 ID,该 ID 在一个 TiDB 集群内部唯一。
* `TIDB_ROW_ID_SHARDING_INFO`:标识表的 Sharding 类型,可能的值为:
- `"NOT_SHARDED"`:表未被 Shard。
- `"NOT_SHARDED(PK_IS_HANDLE)"`:一个定义了整型主键的表未被 Shard。
- `"PK_AUTO_RANDOM_BITS={bit_number}"`:一个定义了整型主键的表由于定义了 `AUTO_RANDOM` 而被 Shard。
- `"SHARD_BITS={bit_number}"`:表使用 `SHARD_ROW_ID_BITS={bit_number}` 进行了 Shard。
Copy link
Member

Choose a reason for hiding this comment

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

Please remove extra spaces at the beginning of line 483~484, and use four-indentation for the 4 subitems. Then the lint failure will be fixed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, Thanks!

- `"NOT_SHARDED"`:表未被 Shard。
- `"NOT_SHARDED(PK_IS_HANDLE)"`:一个定义了整型主键的表未被 Shard。
- `"PK_AUTO_RANDOM_BITS={bit_number}"`:一个定义了整型主键的表由于定义了 `AUTO_RANDOM` 而被 Shard。
- `"SHARD_BITS={bit_number}"`:表使用 `SHARD_ROW_ID_BITS={bit_number}` 进行了 Shard。
Copy link
Contributor

Choose a reason for hiding this comment

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

How about NULL?

nil: for tables that are not suitable(views, system tables).

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, PTAL

@bb7133 bb7133 force-pushed the bb7133/update_tables branch from d08dab8 to 735959c Compare February 18, 2020 12:14
@bb7133 bb7133 force-pushed the bb7133/update_tables branch from 735959c to 0cc2538 Compare February 18, 2020 12:26
@bb7133
Copy link
Member Author

bb7133 commented Feb 18, 2020

PTAL @lilin90 @tangenta

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. @tangenta PTAL~

@@ -477,6 +478,16 @@ SHOW TABLES
[LIKE 'wild']
```

表中的信息大部分定义自 MySQL,此外有两列是 TiDB 新增的:

* `TiDB_TABLE_ID`:标识表的内部 ID,该 ID 在一个 TiDB 集群内部唯一。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* `TiDB_TABLE_ID`:标识表的内部 ID,该 ID 在一个 TiDB 集群内部唯一。
* `TIDB_TABLE_ID`:标识表的内部 ID,该 ID 在一个 TiDB 集群内部唯一。

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed, thanks.

Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

@ran-huang ran-huang merged commit 50151a0 into pingcap:master Feb 20, 2020
ran-huang added a commit that referenced this pull request Feb 20, 2020
@ran-huang ran-huang added aligning and removed translation/doing This PR’s assignee is translating this PR. labels Feb 20, 2020
@ran-huang ran-huang added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed aligning labels Feb 20, 2020
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. v4.0 This PR/issue applies to TiDB v4.0.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants