Bug #19455 | The mysql function my_init conflicts with the new dlopen function my_init wich | ||
---|---|---|---|
Submitted: | 1 May 2006 13:56 | Modified: | 19 Jun 2006 21:08 |
Reporter: | Mesia Mesia | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S1 (Critical) |
Version: | all | OS: | Linux (Fedora Core 5) |
Assigned to: | CPU Architecture: | Any |
[1 May 2006 13:56]
Mesia Mesia
[2 May 2006 10:34]
Mesia Mesia
Changing the my_init function in mysql has done the job. I changed the mysql function my_init to my_minit() and the program now works. Let me know if you will do the same and release a patch or i will have to find some other solution.
[14 May 2006 17:57]
Hartmut Holzgraefe
Hi, i could not find any information on this dlopen function name change and i don't have access to a FC5 system yet. Could you provide some background information on this?
[17 May 2006 17:56]
Mesia Mesia
http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html#DLOPEN Here is a link hope it helps. look for this: void __attribute__ ((constructor)) my_init(void); void __attribute__ ((destructor)) my_fini(void);
[17 May 2006 18:13]
MySQL Verification Team
Thank you for the bug report.
[19 Jun 2006 21:08]
Sergei Golubchik
There's no "new dlopen function my_init wich replaces _init", as far as I cas see. What this HOWTO is saying - there _were_ special function names _init and _fini, but they're obsolete, and you should use __attribute((constructor)) to declare an initialization function, not a special name. Of course if you call your function my_init - like this HOWTO example does - you'll have a name clash with libmysqlclient. But you can give this function any name you want, you do not have to call it "my_init" - this is the whole point of the change, moving from fixed function name _init() to an attribute.