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

Add description about user ATTRIBUTE #11716

Merged
merged 19 commits into from
Nov 7, 2022

Conversation

CbcWestwolf
Copy link
Member

What is changed, added or deleted? (Required)

  1. Support ATTRIBUTE and COMMENT in CREATE USER and ALTER USER statements
  2. Add a new column user_attributes to mysql.user, and add a new view information_schema.user_attributes

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

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v6.4 (TiDB 6.4 versions)
  • v6.3 (TiDB 6.3 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 versions)

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

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 21, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Oreoxmt
  • qiancai

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot requested a review from TomShawn October 21, 2022 03:35
@ti-chi-bot ti-chi-bot added missing-translation-status This PR does not have translation status info. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 21, 2022
@qiancai qiancai added v6.4 This PR/issue applies to TiDB v6.4. translation/doing This PR’s assignee is translating this PR. labels Oct 21, 2022
@ti-chi-bot ti-chi-bot removed the missing-translation-status This PR does not have translation status info. label Oct 21, 2022
@qiancai qiancai added the area/sql-infra Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata. label Oct 21, 2022
@qiancai qiancai self-assigned this Oct 21, 2022
@CbcWestwolf
Copy link
Member Author

/cc xiongjiwei

@ti-chi-bot ti-chi-bot requested a review from xiongjiwei October 21, 2022 12:44
@qiancai qiancai removed the request for review from TomShawn October 24, 2022 03:23
Comment on lines 171 to 174
| Host | char(255) | utf8mb4_bin | NO | PRI | <null> | | select,insert,update,references | |
| User | char(32) | utf8mb4_bin | NO | PRI | <null> | | select,insert,update,references | |
| authentication_string | text | utf8mb4_bin | YES | | <null> | | select,insert,update,references | |
| plugin | char(64) | utf8mb4_bin | YES | | <null> | | select,insert,update,references | |
Copy link
Contributor

@xiongjiwei xiongjiwei Oct 24, 2022

Choose a reason for hiding this comment

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

<null> should be NULL?

@Oreoxmt Oreoxmt requested review from Oreoxmt and qiancai October 24, 2022 06:57
Copy link
Collaborator

@Oreoxmt Oreoxmt 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

information-schema/information-schema-user-attributes.md Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 24, 2022
Comment on lines 10 to 11
{{< copyable "sql" >}}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{{< copyable "sql" >}}

Copy link
Collaborator

Choose a reason for hiding this comment

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

This copy syntax is no longer needed for the current docs website. Please remove it from this doc.

@qiancai qiancai added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Oct 28, 2022
@CbcWestwolf
Copy link
Member Author

/verify

sql-statements/sql-statement-alter-user.md Show resolved Hide resolved
sql-statements/sql-statement-alter-user.md Show resolved Hide resolved
sql-statements/sql-statement-create-user.md Outdated Show resolved Hide resolved
sql-statements/sql-statement-create-user.md Outdated Show resolved Hide resolved
Comment on lines 100 to 102
```
Query OK, 0 rows affected (0.02 sec)
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

建议改成 SELECT * FROM user_attributes; 的输出

sql-statements/sql-statement-alter-user.md Outdated Show resolved Hide resolved
sql-statements/sql-statement-alter-user.md Outdated Show resolved Hide resolved
sql-statements/sql-statement-alter-user.md Outdated Show resolved Hide resolved
sql-statements/sql-statement-create-user.md Outdated Show resolved Hide resolved
sql-statements/sql-statement-create-user.md Outdated Show resolved Hide resolved
@CbcWestwolf
Copy link
Member Author

attribute 里面 {"key": null} 是删除 key 哈,不会出现在查询结果中

Copy link
Collaborator

@Oreoxmt Oreoxmt left a comment

Choose a reason for hiding this comment

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

LGTM

@qiancai
Copy link
Collaborator

qiancai commented Nov 7, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 298c23c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 7, 2022
@qiancai qiancai removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 7, 2022
@qiancai
Copy link
Collaborator

qiancai commented Nov 7, 2022

/merge

@ti-chi-bot ti-chi-bot merged commit daf8ca2 into pingcap:master Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sql-infra Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. v6.4 This PR/issue applies to TiDB v6.4.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants