Bug #94089 UDFs metadata will also be present on the information_schema.routines table
Submitted: 28 Jan 2019 7:03 Modified: 24 Apr 2019 1:45
Reporter: JianJun Shi Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7 & 8.0.13 OS:Linux
Assigned to: CPU Architecture:Any

[28 Jan 2019 7:03] JianJun Shi
Description:
"25.22 The INFORMATION_SCHEMA ROUTINES Table" chapter in the "MySQL 8.0 Reference Manual" and "MySQL 5.7 Reference Manual" was described as following:

...
The ROUTINES table does not include built-in SQL functions or user-defined functions
(UDFs).
...

Actually, user-defined functions' metadata will also be present on the information_schema.routines table.

How to repeat:
use test;
create function RENAME_USER_DEFINER_036() returns int(10) deterministic return(select 1+2*3/4);
select * from information_schema.routines where ROUTINE_SCHEMA='test' and ROUTINE_NAME='RENAME_USER_DEFINER_036';
[30 Jan 2019 9:59] Bogdan Kecman
Hi,

Verified as described. I changed the category to "documentation" as I think the way it works is preferable, just needs to be properly documented.

kind regards
bogdan
[24 Apr 2019 1:45] Paul Dubois
Posted by developer:
 
A user-defined function (UDF) is a function written in C++ and loaded with
CREATE FUNCTION ... SONAME ...
(https://dev.mysql.com/doc/refman/8.0/en/create-function-udf.html)

The CREATE FUNCTION shown in the "How to Repeat" section is an example
of a stored function.
(https://dev.mysql.com/doc/refman/8.0/en/create-procedure.html)

As https://dev.mysql.com/doc/refman/8.0/en/routines-table.html says:
"The ROUTINES table provides information about stored routines (stored procedures and stored functions)."

So although the ROUTINES table (correctly) shows information about the example
function, that function is not a UDF.