-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
privilege: alter table && rename privilege make same with MySQL #9872
Conversation
Enables use of the ALTER TABLE statement to change the structure of tables. ALTER TABLE also requires the CREATE and INSERT privileges.
same with MySQL.
Renaming a table requires ALTER and DROP on the old table, CREATE, and INSERT on the new table.
|
Codecov Report
@@ Coverage Diff @@
## master #9872 +/- ##
================================================
- Coverage 67.3512% 67.3501% -0.0011%
================================================
Files 383 383
Lines 80444 80466 +22
================================================
+ Hits 54180 54194 +14
- Misses 21421 21422 +1
- Partials 4843 4850 +7 |
Codecov Report
@@ Coverage Diff @@
## master #9872 +/- ##
================================================
- Coverage 77.7215% 77.7049% -0.0167%
================================================
Files 403 403
Lines 81873 81942 +69
================================================
+ Hits 63633 63673 +40
- Misses 13547 13572 +25
- Partials 4693 4697 +4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM
@@ -1640,6 +1640,39 @@ func (s *testPlanSuite) TestVisitInfo(c *C) { | |||
{mysql.AllPrivMask, "test", "ttt", "", nil}, | |||
}, | |||
}, | |||
{ | |||
sql: "alter table t add column a int(4)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remember to update our document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@zz-jason PTAL. |
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
/run-common-tests tidb-test=pr/776 |
/run-all-tests |
What problem does this PR solve?
In MySQL:https://dev.mysql.com/doc/refman/5.7/en/privileges-provided.html#priv_alter
What is changed and how it works?
Add more privileges in
alter table
andrename
to make the same with MySQL.Check List
Tests
This change is