Overview
automatic_sp_privileges specifies whether to automatically grant the ALTER and EXECUTE privileges on stored procedures.
Privilege requirements
Query variables
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Modify variables
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | int |
| Default Value | 1 |
| Value range | [0,1] |
| Effective Scope | Global |
| Modifiable | Yes, you can use theSETStatement modification. |
Usage instructions
When a stored procedure is created, if the value of this variable is 1, the creator is automatically granted the ALTER and EXECUTE privileges on the stored procedure. If the variable value is 0, these privileges are not automatically granted.
Configuration example
Privileges to automatically grant ALTER and EXECUTE on stored procedures.
obclient> SET GLOBAL automatic_sp_privileges = true;
References
For information about privileges on stored procedures and functions, query the mysql.procs_priv view.