Skip to content

sql: improve privileges docs #695

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

Merged
merged 6 commits into from
Oct 31, 2018
Merged

sql: improve privileges docs #695

merged 6 commits into from
Oct 31, 2018

Conversation

morgo
Copy link
Contributor

@morgo morgo commented Oct 29, 2018

I noticed a few small errors in the privileges page. While few users use column-level privileges, I think it is still worth calling out on the compatibility page.

@morgo
Copy link
Contributor Author

morgo commented Oct 29, 2018

PTAL @tiancaiamao

@morgo morgo requested review from tiancaiamao and lilin90 October 29, 2018 15:58
@lilin90 lilin90 changed the title sql: Improve privileges docs sql: improve privileges docs Oct 30, 2018
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

sql/privilege.md Outdated
@@ -289,7 +294,7 @@ When TiDB starts, some privilege-check tables are loaded into memory, and then t
If an immediate effect is needed when you modify the `grant` table, you can run the following command:

```sql
flush privileges
flush privileges;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps use ALL CAPS here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lilin90 do we have a style for SQL commands? I like to write keywords in caps as kenny suggests, but many of our existing examples are lower case.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the style is all-lowercase then the DROP USER 'test'; statement above should be changed to drop user 'test';.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I agree. I'll change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lilin90 There are quite a few inconsistencies: CREATE USER, REVOKE are in caps. I can go through and change once I have confirmation of the style.

Copy link
Member

Choose a reason for hiding this comment

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

@morgo Thanks! Currently, we don't have a strict SQL style. But to improve the consistency, we can now establish one: "Capitalize all SQL keywords and reserved words." Later, I'll update that in docs-cn and tell other members to follow this style.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lilin90 thanks, I've updated all keywords to caps. PTAL

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao merged commit f889857 into master Oct 31, 2018
@tiancaiamao tiancaiamao deleted the morgo/privileges branch October 31, 2018 12:43
lilin90 added a commit to lilin90/docs-cn that referenced this pull request Nov 1, 2018
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants