Purpose
This statement triggers a recompilation of a procedure or function.
Privilege requirements
To execute the ALTER COMPILE statement, the current user must have the ALTER privilege. For more information about OceanBase Database privileges, see Privilege types in MySQL mode.
Syntax
ALTER {procedure | function} name COMPILE [reuse settings]
Parameters
| Parameter | Description |
|---|---|
| procedure | Specifies the type of alter as procedure. |
| function | Specifies the type of alter as function. |
| name | The name of the stored procedure or function to be recompiled. |
| reuse settings | An optional parameter. If you specify the reuse settings clause, the procedure or function is compiled with the same settings as the original PL object. If you do not specify this clause, the procedure or function is compiled with the settings in the current session. |
Examples
obclient> ALTER procedure test_p COMPILE reuse settings;
Query OK, 0 rows affected (0.242 sec)