Bug #4153 UDFs on Solaris 9 not loading with code that uses "new" to create objects
Submitted: 15 Jun 2004 22:00 Modified: 30 Dec 2004 17:08
Reporter: Matthew Lord Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: User-defined functions ( UDF ) Severity:S2 (Serious)
Version:4.0.20 max 64 OS:Solaris (Solaris 9 64bit (sparc))
Assigned to: CPU Architecture:Any

[15 Jun 2004 22:00] Matthew Lord
Description:
UDFs don't seem to load when using the c++ "new" statement.

How to repeat:
Install mysql-max-4.0.20-sun-solaris2.9-sparc-64bit on Solaris 9.

Compile the attached testcode.cc.

gcc -shared -m64 -I./include -o testcode.so -c testcode.cc 

If the lines using "new" are commented out 

create function `plustwo` returns integer soname "testcode.so";

works.

If you uncomment the lines using "new" to create an object then  the create function
fails with a relocation error.
[15 Jun 2004 22:01] Matthew Lord
the udf code

Attachment: testcode.cc (application/octet-stream, text), 3.41 KiB.

[16 Jun 2004 0:01] Matthew Lord
This is related to a customer support center issue: #2985
[16 Jun 2004 9:59] Sergei Golubchik
is it solaris/64 only problem ?
[30 Dec 2004 17:08] Matthew Lord
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/