Вопрос

When I try to execute the code bellow I get mysql error 1305:

DROP FUNCTION IF EXISTS myFunction;

It only fails when function does not exist. But why? Isn't that the cleanup step before you re-create functions?

Это было полезно?

Решение

MySQL bug #33813 explains that it may be due to case-sensitivity:

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top