Bug #32196 Different shared library symbol prefix in libmysqlclient_r?
Submitted: 8 Nov 2007 20:51 Modified: 28 Sep 2010 17:19
Reporter: Christian Hammers (Silver Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Jonathan Perkin CPU Architecture:Any
Tags: qc

[8 Nov 2007 20:51] Christian Hammers
Description:
Hello

As reported in http://bugs.debian.org/450535 by Stefan Fritsch:

> there will be mysql support in libaprutil, which will use libmysqlclient_r.so.
> Together with php's mysql extension, this means that both libmysqlclient_r.so
> and libmysqlclient.so will be loaded into Apache. This is probably a very bad
> idea, since both libraries use the same symbols and symbol versions.  

In case you wonder, they talk about the "libmysqlclient_16" in the output
from "objdump -T /usr/lib/libmysqlclient.so.16":
  000000000006b440 g    DF .text  000000000000000d  libmysqlclient_16 my_b_append_tell

> A conversation on #debian-devel with seanius, vorlon, and peterS came to the
> conclusion that the best solution would be to have libmysqlclient_r and
> libmysqlclient use different symbol versions. To have only one mysql library
> transition until lenny release, this would need to be implemented in the first
> upload of 5.1 to unstable.  
>
> Other suggested solutions were
> 
> - link php-mysql to libmysqlclient_r  
> - make libmysqlclient symlink to libmysqlclient_r  
>
> but these might cause unnecessary performance degradation. (Although I don't
> know whether this is really an issue).

What do you think? If you plan to use a different shared library symbol prefix,
please tell me in advance so that Debian does not start to use a different one.

bye,

-christian-

How to repeat:
...

Suggested fix:
Don't know. Using a different symbol prefix sounds good.
[12 Nov 2007 5:36] Valeriy Kravchuk
This, "Different shared library symbol prefix for libmysqlclient_r", sounds like a reasonable feature request to me.
[1 Mar 2008 19:15] Norbert Tretkowski
This problem affects MySQL 5.0 as well. Any plans?
[1 Mar 2008 19:30] Norbert Tretkowski
This problem affects MySQL 5.0 as well. Any plans?
[5 Jul 2009 20:33] Christian Hammers
Another idea Debian people came up with is to simply symlinking libmysqlclient.so to libmysqlclient_r.so. This way all applications would automatically use the thread safe version. As usually the mysql server is the performance critial point and not the library which merely transmits the data between client and server, this should not have any significant performance drawbacks, or?

bye,

-christian-
[28 Sep 2010 17:19] Jonathan Perkin
The symlink approach is what we have as a result of the CMake work in 5.5.5 and up, thus this bug should be fixed for those releases.