Skip to content

Add description about user ATTRIBUTE#11716

Merged
ti-chi-bot merged 19 commits into
pingcap:masterfrom
CbcWestwolf:user_attribute
Nov 7, 2022
Merged

Add description about user ATTRIBUTE#11716
ti-chi-bot merged 19 commits into
pingcap:masterfrom
CbcWestwolf:user_attribute

Conversation

@CbcWestwolf
Copy link
Copy Markdown
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
Copy Markdown
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.

Details

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
Copy Markdown
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
Copy Markdown
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?

Comment thread information-schema/information-schema-user-attributes.md Outdated
Co-authored-by: Aolin <aolinz@outlook.com>
Comment thread sql-statements/sql-statement-create-user.md Outdated
Comment thread sql-statements/sql-statement-create-user.md Outdated
Comment thread information-schema/information-schema-user-attributes.md Outdated
Comment thread information-schema/information-schema-user-attributes.md Outdated
@Oreoxmt Oreoxmt requested review from Oreoxmt and qiancai October 24, 2022 06:57
Co-authored-by: Aolin <aolinz@outlook.com>
Copy link
Copy Markdown
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

Comment thread information-schema/information-schema-user-attributes.md Outdated
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 24, 2022
Co-authored-by: Aolin <aolinz@outlook.com>
Comment on lines +10 to +11
{{< copyable "sql" >}}

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread information-schema/information-schema-user-attributes.md
Comment thread information-schema/information-schema-user-attributes.md Outdated
CbcWestwolf and others added 2 commits October 24, 2022 19:44
Co-authored-by: Grace Cai <qqzczy@126.com>
Comment thread sql-statements/sql-statement-alter-user.md
Co-authored-by: Grace Cai <qqzczy@126.com>
Comment thread information-schema/information-schema.md Outdated
@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
Co-authored-by: Grace Cai <qqzczy@126.com>
@CbcWestwolf
Copy link
Copy Markdown
Member Author

/verify

Comment thread information-schema/information-schema-user-attributes.md Outdated
Comment thread sql-statements/sql-statement-alter-user.md
Comment thread sql-statements/sql-statement-alter-user.md
Comment thread sql-statements/sql-statement-create-user.md Outdated
Comment thread sql-statements/sql-statement-create-user.md Outdated
Comment on lines +100 to +102
```
Query OK, 0 rows affected (0.02 sec)
```
Copy link
Copy Markdown
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; 的输出

Comment thread sql-statements/sql-statement-alter-user.md
Co-authored-by: Aolin <aolinz@outlook.com>
Comment thread sql-statements/sql-statement-alter-user.md
Comment thread sql-statements/sql-statement-alter-user.md
Comment thread sql-statements/sql-statement-create-user.md
Comment thread sql-statements/sql-statement-create-user.md
CbcWestwolf and others added 3 commits November 1, 2022 16:44
Co-authored-by: Aolin <aolinz@outlook.com>
Co-authored-by: Aolin <aolinz@outlook.com>
@CbcWestwolf
Copy link
Copy Markdown
Member Author

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

Comment thread sql-statements/sql-statement-alter-user.md Outdated
Comment thread sql-statements/sql-statement-alter-user.md
Copy link
Copy Markdown
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

Comment thread information-schema/information-schema-user-attributes.md Outdated
Co-authored-by: Grace Cai <qqzczy@126.com>
@qiancai
Copy link
Copy Markdown
Collaborator

qiancai commented Nov 7, 2022

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

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

DetailsCommit 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
Copy Markdown
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