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

Conversation

@imtbkcat
Copy link
Contributor

commented Feb 26, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2019

/run-all-tests

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2019

LGTM

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2019

PTAL @jackysp

@jackysp
Copy link
Member

left a comment

LGTM

@imtbkcat imtbkcat force-pushed the imtbkcat:createrole branch from 8f0c92b to a096d67 Feb 28, 2019

@imtbkcat imtbkcat force-pushed the imtbkcat:createrole branch from a096d67 to 90f761e Feb 28, 2019

@imtbkcat imtbkcat added status/LGT2 and removed status/LGT1 labels Feb 28, 2019

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

commented Feb 28, 2019

/run-all-tests

1 similar comment
@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

commented Feb 28, 2019

/run-all-tests

@tiancaiamao tiancaiamao merged commit 4f232e5 into pingcap:master Mar 1, 2019

13 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.