数据库
首页 > 数据库> > Mysql“drop function if if exists”失败,代码为1305

Mysql“drop function if if exists”失败,代码为1305

作者:互联网

当我尝试执行代码时,我得到mysql错误1305:

DROP FUNCTION IF EXISTS myFunction;

它只在函数不存在时失败.但为什么?在重新创建函数之前,这不是清理步骤吗?

解决方法:

MySQL bug #33813解释说它可能是由于区分大小写:

Since MySQL 5.0.52, DROP FUNCTION commands taking schema-qualified function names compare the schema name on a case-sensitive basis, even when lower_case_table_names is set to 1. This means that functions are not correctly identified.

标签:mysql,sql-drop
来源: https://codeday.me/bug/20190620/1245746.html