Skip to content

Support RENAME USER command #23648

@morgo

Description

@morgo

Feature Request

Is your feature request related to a problem? Please describe:

mysql [localhost:8023] {msandbox} (test) > create user first;
Query OK, 0 rows affected (0.01 sec)

mysql [localhost:8023] {msandbox} (test) > rename user first to second;
Query OK, 0 rows affected (0.00 sec)

mysql [localhost:8023] {msandbox} (test) > show grants for second;
+------------------------------------+
| Grants for second@%                |
+------------------------------------+
| GRANT USAGE ON *.* TO `second`@`%` |
+------------------------------------+
1 row in set (0.00 sec)

In TiDB:

mysql> create user first;
Query OK, 0 rows affected (0.00 sec)

mysql> rename user first to second;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 11 near "user first to second" 

Describe the feature you'd like:

See above. I noticed this while porting tests for dynamic privileges - I don't have an active need for it.

Describe alternatives you've considered:

N/A

Teachability, Documentation, Adoption, Migration Strategy:

MySQL compatibility.

Metadata

Metadata

Assignees

Labels

type/feature-requestCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions