Mysql drop function xxxx ERROR 1305 (42000): FUNCTION (UDF) xxxx does not exist

mysql> drop function GetEmployeeInformationByID;
ERROR 1305 (42000): FUNCTION (UDF) GetEmployeeInformationByID does not exist
mysql> DELETE FROM mysql.func WHERE name='GetEmployeeInformationByID';
Query OK, 0 rows affected (0.00 sec)

mysql> DELETE FROM mysql.proc WHERE name='GetEmployeeInformationByID';
Query OK, 1 row affected (0.00 sec)

报错信息:

mysql > drop function xxxx 

ERROR 1305 (42000): FUNCTION (UDF) xxxx does not exist

原因分析:

Navicat视图中看到的是可能是function也可能是procdure

参考文章:

user defined functions - Mysql UDF is installed (but doesn't exist?) - Stack Overflow
https://stackoverflow.com/questions/9755103/mysql-udf-is-installed-but-doesnt-exist

MySQL Bugs: #15439: UDF name case handling forces DELETE FROM mysql.func to remove the UDF
https://bugs.mysql.com/bug.php?id=15439

原文地址:https://www.cnblogs.com/rgqancy/p/10328981.html