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: fix drop role failed after revoke role from current user #29814

Merged
merged 4 commits into from
Nov 19, 2021

Conversation

unconsolable
Copy link
Contributor

@unconsolable unconsolable commented Nov 15, 2021

Signed-off-by: unconsolable chenzhipeng2012@gmail.com

What problem does this PR solve?

Issue Number: close #29781

Problem Summary:

What is changed and how it works?

Seems a follow-up of #29494

  • When an active role of current user is revoked, remove it from activeRoles.
  • Add unit test.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Signed-off-by: unconsolable <chenzhipeng2012@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 15, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • mjonss
  • xhebox

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.

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 added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 15, 2021
Signed-off-by: unconsolable <chenzhipeng2012@gmail.com>
@unconsolable unconsolable marked this pull request as ready for review November 15, 2021 13:28
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 15, 2021
@unconsolable
Copy link
Contributor Author

unconsolable commented Nov 15, 2021

Although it still fails on common-test, it seems that the failure in [role] is resolved.
https://ci.pingcap.net/blue/organizations/jenkins/tidb_ghpr_common_test/detail/tidb_ghpr_common_test/7350/pipeline/86
https://ci.pingcap.net/blue/organizations/jenkins/tidb_ghpr_common_test/detail/tidb_ghpr_common_test/7351/pipeline/86

[2021-11-15T13:26:16.159Z] time="2021-11-15T21:26:16+08:00" level=error msg="1 tests failed\n"
[2021-11-15T13:26:16.159Z] time="2021-11-15T21:26:16+08:00" level=error msg="run test [update] err: sql:create table t2 (id int unsigned not null auto_increment primary key, a int);: run \"create table t2 (id int unsigned not null auto_increment primary key, a int);\" at line 148 err Error 1050: Table 'test.t2' already exists"

Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

Looks good, but I have a few questions :)

executor/simple_test.go Outdated Show resolved Hide resolved
executor/simple_test.go Show resolved Hide resolved
executor/simple.go Show resolved Hide resolved
Signed-off-by: unconsolable <chenzhipeng2012@gmail.com>
Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for reporting the new bug too!

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 16, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 19, 2021
@xhebox
Copy link
Contributor

xhebox commented Nov 19, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: fa04b39

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 19, 2021
@ti-chi-bot ti-chi-bot merged commit 9843ff9 into pingcap:master Nov 19, 2021
@unconsolable unconsolable deleted the issue-29781 branch November 19, 2021 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

drop role failed after revoke role from current user
4 participants