-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Closed
Copy link
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Enhancement
Currently, these two system variables are global level and cannot be modified at session level. This introduce the inconvenience when global variables are restricted to modified:
mysql> set @@global.tidb_ddl_reorg_worker_cnt = 6;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation
If TiDB supports session level variables, only ALTER
privilege is needed to add index, instead of SUPER
or SYSTEM_VARIABLES_ADMIN
.
However, there is a slight difference between session level and global level variables.
- For global variables, the modification will also take effect on running DDL jobs.
- For session variables, because the current session is waiting for the DDL to complete and return the result, it cannot modify this parameter online for running DDL jobs. Therefore, there is a restriction that it can only take effect for the next DDL job. In some scenarios, such as adding an index that takes several days, it will be limited.
lance6716
Metadata
Metadata
Assignees
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.