Note
- For OceanBase Database V4.3.x, this variable was introduced in OceanBase Database V4.3.1.
- For OceanBase Database V4.2.x, this variable was introduced in OceanBase Database V4.2.2.
Description
automatic_sp_privileges specifies whether to automatically grant the ALTER and EXECUTE privileges on a stored procedure to its creator.
Applicability
This variable is applicable to only OceanBase Database in MySQL mode.
Attributes
| Attribute | Description |
|---|---|
| Type | Integer |
| Default value | 1 |
| Value range | [0, 1] |
| Effective scope | Global |
| Modifiable | Yes. You can use the SET statement to modify the variable if you have the corresponding SUPER or ALTER SYSTEM privilege. |
Considerations
If the value of this variable is 1, the creator of a stored procedure is automatically granted the ALTER and EXECUTE privileges on the stored procedure. If the value of this variable is 0, these privileges are not automatically granted to the creator.
Example
Specify to automatically grant the ALTER and EXECUTE privileges to the creator of a stored procedure.
obclient> SET GLOBAL automatic_sp_privileges = true;