List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:April 4 2001 2:49pm
Subject:UFD's On windows
View as plain text  

>>>>> "Ralph" == Ralph Mason <ralph.mason@stripped> writes:

Ralph> Hope I'm not breaking any protocols here.
Ralph> I was wanting to try udf's with mySQL on windows so added support for it.  There
> is a new sql_udf.cpp file and the udf_example that will compile to a windows dll.

Ralph> example

Ralph> CREATE FUNCTION lookup RETURNS STRING SONAME "udf_example.dll";

Sounds nice.  When you have got this to work, I hope you will give us
a shared copyright of the code so that we can include this into the
standard distribution of MySQL server?

Ralph> On a side note

Ralph> I guess there is a possibility of crashing the server using udf because they
> could specify any valid dll in the system and the way windows searches for dll's it would
> find it. A simple function in the dll like

Ralph> extern ("C") bool __declspec(dllexport) is_mysql_udf_dll() { return true; }

Ralph> would solve that - it could be called by dlopen with dlopen returning null if
> the function does not exisit or it returns !true. I wonder if this is could be a problem
> on the unix ports also?

It always possible to crash MySQL by trying to load a wrong .dll or
.so file (If you have the privilege to do this).  On the other hand,
as having a function like the above would not make it harder for anyone
that wants to crash the machine if they want to, I don't think we
would really need it.  The extra safety you get doesn't seem to worth
the trouble; If you have some other opinions, please email them to me...

UFD's On windowsRalph Mason3 Apr
  • Re: UFD's On windowsSinisa Milivojevic3 Apr
  • UFD's On windowsMichael Widenius5 Apr