Cannot use MySQL UDF function

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.

+5
3

, :

UDF , , , , . , , install.

:

bash > mysql -u user -p < installdb.sql
Enter password:
ERROR 1125 (HY000) at line 7: Function 'lib_mysqludf_ssdeep_info' already exists
:
  1. , .
  2. function mysql.func,
  3. MySQL ( 2),

, @jmcejuela .

: http://simonholywell.com/post/2012/01/mysql-udf-install-error-function-already-exists.html

+5

, .so, /s. - , , SELECT * FROM mysql.func, , , . - DROP , , , - . CREATE func, ...

func (func.MYI, func.MYD, func.frm mysql/mysql) , .

, . mysql ( , )

: .so .

+1

( ) .so, .

, . Mysqld mysql.func ().so. , , , .

-1

All Articles