I loaded the UDF function in MySQL (without selecting any specific DB). It worked well during my session, but now I get the error message "ERROR 1305 (42000): FUNCTION currentdatabase.myfunction does not exist" when I try to use this function with the following sql statement:
select myfunction('aaa');
Then I tried to reset the function and I got the same error code:
mysql> drop function myfunction;
ERROR 1305 (42000): FUNCTION database.myfunction does not exist
if the database is selected.
Other error code otherwise:
ERROR 1046 (3D000): No database selected
So, I decided to specify the function again, and I got the following error code:
CREATE FUNCTION myfunction RETURNS INT SONAME 'myfunction.so';
ERROR 1125 (HY000): Function 'myfunction' already exists
My question is: how to use my function again?
Thanks in advance.
Note: there is no space problem (for example, "select myfunction ('aaa';;)), as reported on several other sites.