Jump to content
  • Advertisement
Sign in to follow this  
Buzz1982

UDF in mysql

This topic is 3935 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I want to create a user defined function in mysql. I have used c language to develop the function and created a .dll file named udf.dll . I have placed this .dll file in mysql bin directory. But when I run create function query I get the following error, When I run this query create function Rank returns real soname 'udf.dll'; i get this error error 1126 (HY000) can`t open shared library `udf.dll` (errno: 22 udf.dll: cannot open shared object file: No such file or directory) Following is the code in c language that I am using, Please help me solve this problem. #ifdef STANDARD #include <stdio.h> #include <string.h> #ifdef __WIN__ typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */ typedef __int64 longlong; #else typedef unsigned long long ulonglong; typedef long long longlong; #endif /*__WIN__*/ #else #include <my_global.h> #include <my_sys.h> #endif #include <mysql.h> #include <m_ctype.h> #include <m_string.h> // To get strmov() static pthread_mutex_t LOCK_hostname; /* These must be right or mysqld will not find the symbol! */ extern "C" double Rank( UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error ) { return 99.65; }

Share this post


Link to post
Share on other sites
Advertisement
A few things are a bit puzzling here.

The "soname" and "shared object" make me thing this is Linux-ish OS, and DLLs are Windows libraries.

What's the compiler and OS you're using, how was the DLL compiled, you'll need to provide more information.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!