Skip to content

Commit

Permalink
resource group: change '' to the default resource group (#14009)
Browse files Browse the repository at this point in the history
  • Loading branch information
hfxsd committed Jun 28, 2023
1 parent 9438200 commit 1464f74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sql-statements/sql-statement-alter-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,18 @@ SELECT USER, JSON_EXTRACT(User_attributes, "$.resource_group") FROM mysql.user W
1 row in set (0.02 sec)
```

Unbind the user to a resource group, that is, set the resource group to which the user is bound to be empty. After unbinding, the user will be bound to the `default` resource group.
Unbind the user to a resource group, that is, bind the user to the `default` resource group.

```sql
ALTER USER 'newuser' RESOURCE GROUP ``;
ALTER USER 'newuser' RESOURCE GROUP `default`;
SELECT USER, JSON_EXTRACT(User_attributes, "$.resource_group") FROM mysql.user WHERE user = "newuser";
```

```
+---------+---------------------------------------------------+
| USER | JSON_EXTRACT(User_attributes, "$.resource_group") |
+---------+---------------------------------------------------+
| newuser | "" |
| newuser | "default" |
+---------+---------------------------------------------------+
1 row in set (0.02 sec)
```
Expand Down
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-set-resource-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ SELECT CURRENT_RESOURCE_GROUP();
Execute `SET RESOURCE GROUP` to specify the current session to use the default resource group.

```sql
SET RESOURCE GROUP ``;
SET RESOURCE GROUP `default`;
SELECT CURRENT_RESOURCE_GROUP();
```

Expand Down

0 comments on commit 1464f74

Please sign in to comment.