-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
support column privilege #9766
Comments
@tiancaiamao PTAL |
This is documented under compatibility already: https://www.pingcap.com/docs/sql/mysql-compatibility/ Note that column level privileges pre-dated views in MySQL (which are usually a better way of handling this). I don't think this is a high priority feature, but it might be useful for compatibility. |
The feature request can be rewritten to this simpler one: Feature Request DescriptionSupported column privilege as MySQL. Below is a simple example of column privilege. Create a table drop table if exists t;
create table t(a bigint, b bigint);
create user user_a@localhost;
grant select(a) on t to user_a@localhost;
flush privileges; As you can see in MySQL, it supports column privilege:
But in TiDB, column privilege is not supported for now: TiDB(root@127.0.0.1:test) > show grants for user_a@localhost;
+--------------------------------------------+
| Grants for user_a@localhost |
+--------------------------------------------+
| GRANT USAGE ON *.* TO 'user_a'@'localhost' |
+--------------------------------------------+
1 row in set (0.00 sec) Refer to: MySQL Column Privileges CategoryFeature, Security Value
As @morgo mentioned in the above comment, I haven't seen the request from users at present. The biggest value IMO at present is for MySQL compatibility. We can higher the value point in the future if there are some urgent or important use cases of this feature. Workload Estimation
It's hard to say, maybe 30 man day? |
Feature Request
Describe the feature you'd like:
Supported column privilege control.
Teachability, Documentation, Adoption, Migration Strategy:
https://dev.mysql.com/doc/refman/8.0/en/grant.html#grant-column-privileges
The text was updated successfully, but these errors were encountered: