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

executor: add CREATE ROLE support #9461

Merged
merged 9 commits into from
Mar 1, 2019
Merged

Conversation

imtbkcat
Copy link

What problem does this PR solve?

Add CREATE ROLE support for executor. User could create role by using CREATE ROLE

What is changed and how it works?

In MySQL, role just like user, which is saved in mysql.user table. We could implement CREATE ROLE by reusing CreateUserStmt.

Also, role is not allowed to be login. So account_locked is needed. If a user or role in mysql.user is locked, it can not be login.

parser pr: pingcap/parser#219

Check List

Tests

  • Unit test

Code changes

  • Has exported variable/fields change

Side effects

  • Increased code complexity

@imtbkcat
Copy link
Author

/run-all-tests

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 27, 2019
@tiancaiamao
Copy link
Contributor

PTAL @jackysp

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

@imtbkcat imtbkcat added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 28, 2019
@imtbkcat
Copy link
Author

/run-all-tests

1 similar comment
@imtbkcat
Copy link
Author

/run-all-tests

@tiancaiamao tiancaiamao merged commit 4f232e5 into pingcap:master Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants