maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #00332
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
that ABI
has changed "dramatically" is that for example an exported symbol
named
TERMINATE has gone, while new symbols PSI_hook and PSI_server were
added.
He uses "nm" for his argumentation.
Clint's claim is that every time an exported symbol is changed/
removed or
added, shared library version must be bumped. Unix linkers export
every
global function and variable by default. Which means, if one
renames a
global variable as part of cleanup, the ABI is changed. Changes
like that
can happen really in any point release, so I see no other way to
maintain
the 100% ABI compatibility, rather than restricting visibility to
only
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,
and
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
public bugreport.
Besides ,
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
most of
the programs are written using officially documented client API
functions,
so there won't be many surprises.
They should, otherwise all kinds of things can go wrong anyway.
Regards,
Arjen.
--
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
References