Note
This variable is introduced since 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 only to OceanBase Database in MySQL mode.
Attributes
| Attribute | Description |
|---|---|
| Type | INT |
| Default value | 1 |
| Value range | [0, 1] |
| Applicable 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.
Examples
Set the variable at the global level as follows:
obclient> SET GLOBAL automatic_sp_privileges = true;