DROP RESOURCE GROUP group_name
[FORCE]
DROP RESOURCE GROUP
is used for resource group management (see Section 5.1.16, “Resource Groups”). DROP RESOURCE GROUP
用于资源组管理(参见第5.1.16节,“资源组”)。This statement drops a resource group. 此语句删除一个资源组。It requires the 它需要RESOURCE_GROUP_ADMIN
privilege.RESOURCE_GROUP_ADMIN
权限。
group_name
identifies which resource group to drop. group_name
标识要删除的资源组。If the group does not exist, an error occurs.如果该组不存在,则会发生错误。
The 如果资源组分配了任何线程,则FORCE
modifier determines statement behavior if the resource group has any threads assigned to it:FORCE
修饰符将确定语句行为:
If 如果不给定FORCE
is not given and any threads are assigned to the group, an error occurs.FORCE
,并且将任何线程分配给组,则会发生错误。
If 如果给定FORCE
is given, existing threads in the group are moved to their respective default group (system threads to SYS_default
, user threads to USR_default
).FORCE
,组中的现有线程将移动到各自的默认组(系统线程到SYS_default
,用户线程到USR_default
)。
Examples:
Drop a group, failing if the group contains any threads:删除组,如果该组包含任何线程,则失败:
DROP RESOURCE GROUP rg1;
Drop a group and move existing threads to the default groups:删除组并将现有线程移动到默认组:
DROP RESOURCE GROUP rg2 FORCE;
Resource group management is local to the server on which it occurs. 资源组管理是发生在其上的服务器的本地管理。DROP RESOURCE GROUP
statements are not written to the binary log and are not replicated.语句不会写入二进制日志,也不会被复制。