#### 13.7.4.2 DROP FUNCTION Statement for Loadable Functions

[]()[]()[]()[]()[]()

```
DROP FUNCTION [IF EXISTS] function_name
```

 This statement drops the loadable function named *`function_name`*. (`DROP FUNCTION` is also used to drop stored functions; see [Section 13.1.29, “DROP PROCEDURE and DROP FUNCTION Statements”](drop-procedure.html).)

[`DROP FUNCTION`](drop-function-loadable.html) is the complement of [`CREATE FUNCTION`](create-function-loadable.html). It requires the [`DELETE`](privileges-provided.html#priv_delete) privilege for the `mysql` system schema because it removes the row from the `mysql.func` system table that registers the function.

[`DROP FUNCTION`](drop-function-loadable.html) also removes the function from the Performance Schema [`user_defined_functions`](performance-schema-user-defined-functions-table.html) table that provides runtime information about installed loadable functions. See [Section 27.12.21.8, “The user\_defined\_functions Table”](performance-schema-user-defined-functions-table.html).

 During the normal startup sequence, the server loads functions registered in the `mysql.func` table. Because [`DROP FUNCTION`](drop-function-loadable.html) removes the `mysql.func` row for the dropped function, the server does not load the function during subsequent restarts.

[`DROP FUNCTION`](drop-function-loadable.html) cannot be used to drop a loadable function that is installed automatically by components or plugins rather than by using [`CREATE FUNCTION`](create-function-loadable.html). Such a function is also dropped automatically, when the component or plugin that installed it is uninstalled.

Note

 To upgrade the shared library associated with a loadable function, issue a [`DROP FUNCTION`](drop-function-loadable.html) statement, upgrade the shared library, and then issue a [`CREATE FUNCTION`](create-function-loadable.html) statement. If you upgrade the shared library first and then use [`DROP FUNCTION`](drop-function-loadable.html), the server may unexpectedly shut down.

