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, plan: add revoke role support #9771

Merged
merged 11 commits into from Apr 11, 2019

Conversation

Projects
None yet
3 participants
@imtbkcat
Copy link
Contributor

imtbkcat commented Mar 18, 2019

What problem does this PR solve?

Support revoke roles from users.

What is changed and how it works?

Add RevokeRoleStmt structure which could parser REVOKE FROM SQL. Executor in TiDB will read information from RevokeRoleStmt to delete relation from mysql.role_edges.

Executor will begin transaction to delete every information in mysql.role_edges which match delete conditions.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change

Side effects

  • Increased code complexity
@jackysp

This comment has been minimized.

Copy link
Member

jackysp commented Mar 21, 2019

Please remove the test output.

@imtbkcat imtbkcat force-pushed the imtbkcat:revokerole branch from 5b89884 to 1c34acd Mar 21, 2019

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

tiancaiamao commented Mar 25, 2019

Ping @imtbkcat

@imtbkcat imtbkcat force-pushed the imtbkcat:revokerole branch 2 times, most recently from 372d4a1 to 90584d9 Mar 29, 2019

@codecov

This comment has been minimized.

Copy link

codecov bot commented Apr 1, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@6958760). Click here to learn what that means.
The diff coverage is 47.0588%.

@@             Coverage Diff             @@
##             master      #9771   +/-   ##
===========================================
  Coverage          ?   77.9829%           
===========================================
  Files             ?        405           
  Lines             ?      82118           
  Branches          ?          0           
===========================================
  Hits              ?      64038           
  Misses            ?      13362           
  Partials          ?       4718
@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

imtbkcat commented Apr 4, 2019

parser pr: pingcap/parser#245

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

imtbkcat commented Apr 4, 2019

/run-all-tests

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

imtbkcat commented Apr 4, 2019

Show resolved Hide resolved go.mod Outdated
Show resolved Hide resolved executor/simple_test.go

@imtbkcat imtbkcat force-pushed the imtbkcat:revokerole branch 2 times, most recently from b23a13c to fa62e14 Apr 4, 2019

@imtbkcat imtbkcat force-pushed the imtbkcat:revokerole branch from fa62e14 to 1a41877 Apr 8, 2019

imtbkcat added some commits Apr 8, 2019

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

imtbkcat commented Apr 9, 2019

/run-all-test

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

imtbkcat commented Apr 9, 2019

/run-all-tests

@jackysp
Copy link
Member

jackysp left a comment

LGTM

@imtbkcat imtbkcat added the status/LGT1 label Apr 9, 2019

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

imtbkcat commented Apr 10, 2019

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

tiancaiamao commented Apr 11, 2019

LGTM

@tiancaiamao tiancaiamao added status/LGT2 and removed status/LGT1 labels Apr 11, 2019

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

tiancaiamao commented Apr 11, 2019

/run-all-tests

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

imtbkcat commented Apr 11, 2019

/run-all-tests

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

tiancaiamao commented Apr 11, 2019

/run-mybatis-test
/run-sqllogic-test-1

@imtbkcat imtbkcat merged commit 4f20b5b into pingcap:master Apr 11, 2019

14 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/code_coverage 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
You can’t perform that action at this time.