Skip to content

DROP ROLE not work as expected in the SHOW result. #29655

Closed
@winoros

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE ROLE `engineering`@`US`;
CREATE ROLE `engineering`@`INDIA`;
DROP ROLE engineering@INDIA;
DROP ROLE engineering@US;
SELECT user,host FROM mysql.user;

...

tidb> CREATE ROLE `engineering`@`US`;
Query OK, 0 rows affected (0.01 sec)

tidb> CREATE ROLE `engineering`@`INDIA`;
Query OK, 0 rows affected (0.00 sec)

tidb> DROP ROLE engineering@INDIA;
Query OK, 0 rows affected (0.01 sec)

tidb> DROP ROLE engineering@US;
Query OK, 0 rows affected (0.00 sec)

tidb> select user,host from mysql.user;

2. What did you expect to see? (Required)

+-------------+-------+
| user        | host  |
+-------------+-------+
| root        | %     |
+-------------+-------+
3 rows in set (0.00 sec)

3. What did you see instead (Required)

+-------------+-------+
| user        | host  |
+-------------+-------+
| root        | %     |
| engineering | india |
| engineering | us    |
+-------------+-------+
3 rows in set (0.00 sec)

4. What is your TiDB version? (Required)

master&5.3

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions