maria-discuss team mailing list archive
Mailing list archive
Re: client library shared library version changed in 5.5.10
Hi Vlad, all
On 28/03/2011, at 8:18 AM, Vladislav Vaintroub wrote:
For 5.5 the discussion starts here http://bugs.mysql.com/bug.php?id=59078
([9 Feb 2:26] Clint Byrum, IIRC he works for Debian). His argument
has changed "dramatically" is that for example an exported symbol
TERMINATE has gone, while new symbols PSI_hook and PSI_server were
He uses "nm" for his argumentation.
Clint's claim is that every time an exported symbol is changed/
added, shared library version must be bumped. Unix linkers export
global function and variable by default. Which means, if one
global variable as part of cleanup, the ABI is changed. Changes
can happen really in any point release, so I see no other way to
the 100% ABI compatibility, rather than restricting visibility to
symbols defined by client API (i.e mysql_xxx stuff) . On some
Unixes, it is
possible to do with linker version script .On Windows symbols were
restricted to the official API from the start on , using with
the .def file.
This would be a clean solution from my point of view. However,
should we go
for it, this would result in incompatibilities with Oracle's MySQL,
this has to be worked out somehow (best thing is probably contribute
visibility-restricting patch, if they are at all interested) .
I think it makes sense to use a linker version script just like
using .def on Windows.
There's a clearly defined (and documented) set of functions and
variables, and nothing else should be exposed.
Obviously if some environments don't support doing this for a library
then there's not much we can do (apart from not having global
variables! ;-) but otherwise it works out fine and also satisfies
Clint's concerns. I figure libmysqlclient is not the only thing Debian
has reviewed, so apparently the many other libraries do apply a
methodology that restricts undesired symbol exposure.
So, no need to invent the wheel there; if others do this, it'll be
plainly visible. Look at another library and see how it's done there.
Do the same and indeed let's submit that cleanup back to Oracle in a
Unix users need to be warned that shared and static library are not
interchangeable and that it will not be possible to access e.g
mysys/strings/dbug functionality using the shared library. Hopefully
the programs are written using officially documented client API
so there won't be many surprises.
They should, otherwise all kinds of things can go wrong anyway.
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Remote expertise & maintenance for MySQL/MariaDB server environments.
Follow us at http://openquery.com/blog/ & http://twitter.com/openquery