-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
severity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create database db2;
create table db2.t1(id int, val varchar(100));
insert into db2.t1 values(1, 'a'), (2, 'b');
create table db2.t2(id int, val varchar(100));
insert into db2.t2 values(1, 'a'), (2, 'b');
create user user1 identified by '123456';
grant select(val), update(val) on db2.t2 to user1;mysql> show grants for user1;
+---------------------------------------------------------+
| Grants for user1@% |
+---------------------------------------------------------+
| GRANT USAGE ON *.* TO 'user1'@'%' |
| GRANT SELECT(val), UPDATE(val) ON db2.t2 TO 'user1'@'%' |
+---------------------------------------------------------+
mysql> drop user user1;
Query OK, 0 rows affected (0.02 sec)
mysql> show grants for user1;
+---------------------------------------------------------+
| Grants for user1@% |
+---------------------------------------------------------+
| GRANT SELECT(val), UPDATE(val) ON db2.t2 TO 'user1'@'%' |
+---------------------------------------------------------+
1 row in set (0.00 sec)
2. What did you expect to see? (Required)
empty grants for a dropped user
3. What did you see instead (Required)
still can see column privileges
4. What is your TiDB version? (Required)
mysql> select tidb_version()\G;
*************************** 1. row ***************************
tidb_version(): Release Version: v5.4.0
Edition: Community
Git Commit Hash: 55f3b24c1c9f506bd652ef1d162283541e428872
Git Branch: heads/refs/tags/v5.4.0
UTC Build Time: 2022-01-25 08:41:03
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)
Metadata
Metadata
Assignees
Labels
severity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.