lava-oushudb-dt-sql-parser/test/parser/mysql/syntax/fixtures/createResourceGroup.sql
琉易 428d851913
feat: #190 improve mysql grammer (#196)
* refactor: generic rename to mysql

* refactor: g4 with mysql syntax

* test: mysql syntax

* refactor: remove useless keywords

* refactor: remove nonReserved keywords

* refactor: lint specificFunction

---------

Co-authored-by: liuyi <liuyi@dtstack.com>
2023-11-27 15:25:40 +08:00

27 lines
1.1 KiB
SQL

-- https://dev.mysql.com/doc/refman/8.0/en/create-resource-group.html
/* CREATE RESOURCE GROUP group_name
TYPE = {SYSTEM|USER}
[VCPU [=] vcpu_spec [, vcpu_spec] ...]
[THREAD_PRIORITY [=] N]
[ENABLE|DISABLE]
vcpu_spec: {N | M - N} */
CREATE RESOURCE GROUP group_name TYPE = SYSTEM VCPU = 2, 3 THREAD_PRIORITY = 5 DISABLE;
CREATE RESOURCE GROUP group_name TYPE = SYSTEM VCPU = 2, 3 THREAD_PRIORITY = 5 ENABLE;
CREATE RESOURCE GROUP group_name TYPE = SYSTEM VCPU 2 THREAD_PRIORITY 5 ENABLE;
CREATE RESOURCE GROUP group_name TYPE = SYSTEM VCPU 2 THREAD_PRIORITY 5 ENABLE;
CREATE RESOURCE GROUP group_name TYPE = USER VCPU 2 THREAD_PRIORITY 5 DISABLE;
CREATE RESOURCE GROUP group_name TYPE = USER VCPU 2 THREAD_PRIORITY 5;
CREATE RESOURCE GROUP group_name TYPE = USER VCPU 2 DISABLE;
CREATE RESOURCE GROUP group_name TYPE = USER DISABLE;
CREATE RESOURCE GROUP group_name TYPE = USER ENABLE;
CREATE RESOURCE GROUP group_name TYPE = USER;
CREATE RESOURCE GROUP rg1 TYPE = USER VCPU = 0-63;
CREATE RESOURCE GROUP rg1 TYPE = USER VCPU = 0-63, 64-65, 66;
CREATE RESOURCE GROUP rg2 TYPE = USER THREAD_PRIORITY = 5;
CREATE RESOURCE GROUP rg3 TYPE = USER DISABLE;