Purpose
This statement is used to trigger the 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 privileges in OceanBase Database, see Privilege classification in MySQL mode.
Syntax
ALTER {procedure|function} name COMPILE [reuse settings]
Parameters
| Parameter | Description |
|---|---|
| procedure | Specifies that the alter operation is for a procedure. |
| function | Specifies that the alter operation is for a function. |
| name | The name of the stored procedure or function to be recompiled. |
| reuse settings | An optional parameter. If specified, the PL object is compiled using the same settings as the original one. If not specified, the PL object is compiled using the settings from the current session. |
Examples
obclient> ALTER procedure test_p COMPILE reuse settings;
