Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top