I was not able to load a function in udf_example.so.  The response to
CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';

is

Error Code: 1126. Can't open shared library 'udf_example.so' (errno: 0
/usr/lib64/mysql/plugin/udf_example.so: cannot open shared object file: No
such file or directory)

I did follow instructions
1. compile udf_example.so with
gcc -fPIC -I/usr/include/mysql/ -shared -o udf_example.so udf_example.c
2. verify my plugin directory:
show variables like 'plugin%' : /usr/lib64/mysql/plugin/
3. place udf_example.so in /usr/lib64/mysql/plugin/
4. verify I have a table mysql.func and a column 'type': SELECT * FROM
mysql.func;

Any hints?  Thank you.

Reply via email to