Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

13.7.3.2 DROP FUNCTION Statement for Loadable Functions

DROP FUNCTION [IF EXISTS]function_name

This statement drops the loadable function namedfunction_name. (DROP FUNCTION is also used to drop stored functions; seeSection 13.1.27, “DROP PROCEDURE and DROP FUNCTION Statements”.)

DROP FUNCTION is the complement ofCREATE FUNCTION. It requires theDELETE privilege for themysql system database because it removes the row from themysql.func system table that registers the function.

During the normal startup sequence, the server loads functions registered in themysql.func table. BecauseDROP FUNCTION removes themysql.func row for the dropped function, the server does not load the function during subsequent restarts.

Note

To upgrade the shared library associated with a loadable function, issue aDROP FUNCTION statement, upgrade the shared library, and then issue aCREATE FUNCTION statement. If you upgrade the shared library first and then useDROP FUNCTION, the server may unexpectedly shut down.