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

planner/core,session: fix privilege check for update #8376

Merged
merged 4 commits into from
Nov 21, 2018

Conversation

tiancaiamao
Copy link
Contributor

@tiancaiamao tiancaiamao commented Nov 21, 2018

What problem does this PR solve?

In the statement: "update t1,t2 set t1.id = t2.id"
TiDB should check update privilege for t1 and select privilege for t2,
Fix a bug that it checks update privilege for both t1 and t2

What is changed and how it works?

Check update privilege for the Columns in the Assignment expression
Check select privilege for the table lists the update statement visit

Check List

Tests

  • Unit test

@jackysp @XuHuaiyu


This change is Reviewable

In the statement: "update t1,t2 set t1.id = t2.id"
TiDB should check update privilege for t1 and select privilege for t2,
Fix a bug that it checks update privilege for both t1 and t2
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

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@eurekaka eurekaka added the status/LGT2 Indicates that a PR has LGTM 2. label Nov 21, 2018
@eurekaka
Copy link
Contributor

/run-all-tests

@zz-jason
Copy link
Member

/run-sqllogic-test

@tiancaiamao tiancaiamao merged commit 89cd59d into pingcap:master Nov 21, 2018
@tiancaiamao tiancaiamao deleted the update-priv branch November 21, 2018 10:15
yu34po pushed a commit to yu34po/tidb that referenced this pull request Nov 22, 2018
In the statement: "update t1,t2 set t1.id = t2.id"
TiDB should check update privilege for t1 and select privilege for t2,
Fix a bug that it checks update privilege for both t1 and t2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/privilege status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants