Create and retire a SQL UDF

Create a small SQL function, use it in a query, and remove its exact signature. Test function permissions and behavior in a dedicated database before sharing it with an application.

CREATE DATABASE cookbook_udf;
USE cookbook_udf;
CREATE FUNCTION add_tax(amount INT, tax INT) RETURNS INT
LANGUAGE SQL AS '$1 + $2';
SELECT add_tax(100,10) AS total;
DROP FUNCTION add_tax(INT,INT);
DROP DATABASE cookbook_udf;

add_tax(100,10) returns 110. Dropping the function by name and argument types removes this test signature; other overloads, if any, require separate cleanup. See the v4.2.4 source test.