Bug #39116 Can't not load .dll in 'plugin_dir'
Submitted: 29 Aug 2008 10:50 Modified: 1 Sep 2008 17:15
Reporter: Albert Rovira Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: User-defined functions ( UDF ) Severity:S3 (Non-critical)
Version:5.1 OS:Windows
Assigned to: CPU Architecture:Any

[29 Aug 2008 10:50] Albert Rovira
Description:
'plugin_dir' must be a directory that is searched by your system's dynamic linker by default or will not work.

For example, on windows if you define
plugin_dir=E:\\MySQL\\MySQL Server 5.1\\plugin 

and try to load a dll from this directory. It will not work until if you don't add this directory to the PATH environment

How to repeat:
For example, on windows if you define
plugin_dir=E:\\MySQL\\MySQL Server 5.1\\plugin 

and try to load a dll from this directory. It will not work until if you don't add this directory to the PATH environment
[30 Aug 2008 16:33] MySQL Verification Team
Thank you for the bug report. Which is the output of the below command for your system?.

show variables like "%plugin_dir%";

Thanks in advance.
[1 Sep 2008 17:05] Albert Rovira
I test a bit more and the problem is not related to mysql server at all. 

The dll I've tried to load depends on another dll that was not in the path of the system. The error was because it could not load this dependence.

mysql> CREATE FUNCTION  geo_centroid     RETURNS STRING SONAME "geo.dll";
ERROR 1126 (HY000): Can't open shared library 'geo.dll' (errno: 2 )

I search info about errno:2 but not found nothing on the documentation.

Can Mysql provide more useful error message when this error happens? 

It would be useful document it. Something like 'If you load a dll and get errno:2 check dependences of your dll' can save many headaches ;-)

Thanks for your fast suport,
Albert.
[1 Sep 2008 17:15] MySQL Verification Team
Thank you for the feedback. For errors description use the perror.exe tool.

C:\temp\mysql-6.0.2-alpha-win32>bin\perror 2
OS error code   2:  No such file or directory
[17 Nov 2010 6:41] Roel Van de Paar
See bug #45549