-
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
reference/system-databases: add description for TIDB_ROW_ID_SHARDING_INFO
#2237
Conversation
* `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。 |
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.
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.
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!
- `"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。 |
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.
How about NULL
?
nil: for tables that are not suitable(views, system tables).
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, PTAL
d08dab8
to
735959c
Compare
735959c
to
0cc2538
Compare
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. @tangenta PTAL~
@@ -477,6 +478,16 @@ SHOW TABLES | |||
[LIKE 'wild'] | |||
``` | |||
|
|||
表中的信息大部分定义自 MySQL,此外有两列是 TiDB 新增的: | |||
|
|||
* `TiDB_TABLE_ID`:标识表的内部 ID,该 ID 在一个 TiDB 集群内部唯一。 |
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.
* `TiDB_TABLE_ID`:标识表的内部 ID,该 ID 在一个 TiDB 集群内部唯一。 | |
* `TIDB_TABLE_ID`:标识表的内部 ID,该 ID 在一个 TiDB 集群内部唯一。 |
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.
Addressed, 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
What is changed, added or deleted?
Add description for the new
TIDB_ROW_ID_SHARDING_INFO
column ininformation_schema
.tables
table.What is the related PR or file link(s)?
Reference link(s):infoschema: add
TIDB_ROW_ID_SHARDING_INFO
fortable
table. tidb#13418 and infoschema: updateinformation_schema
.tables
to support AUTO_RANDOM. tidb#14583This PR is to align with:
N/A (not applicable)
Which TiDB version(s) does your changes apply to?
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.