13.7.3.2 DROP FUNCTION Statement
DROP FUNCTION function_name
This statement drops the user-defined function (UDF) named function_name
.
To drop a function, you must have the DELETE
privilege for the mysql
system database. This is because DROP FUNCTION
removes a row from the mysql.func
system table that records the function's name, type, and shared library name.
Note
To upgrade the shared library associated with a UDF, issue a DROP FUNCTION
statement, upgrade the shared library, and then issue a CREATE FUNCTION
statement. If you upgrade the shared library first and then use DROP FUNCTION
, the server may crash.
DROP FUNCTION
is also used to drop stored functions (see Section 13.1.27, “DROP PROCEDURE and DROP FUNCTION Statements”).