5

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?

Kara
  • 6,115
  • 16
  • 50
  • 57
Borut Tomazin
  • 8,041
  • 11
  • 78
  • 91

1 Answers1

7

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.

Kermit
  • 33,827
  • 13
  • 85
  • 121