MySQL 8.0 Release Notes
MySQL 8.0 Source Code Documentation
The CREATE FUNCTION
statement is
used to create stored functions and loadable functions:
For information about creating stored functions, see Section 15.1.17, βCREATE PROCEDURE and CREATE FUNCTION Statementsβ.
For information about creating loadable functions, see Section 15.7.4.1, βCREATE FUNCTION Statement for Loadable Functionsβ.