← Back to team overview

maria-discuss team mailing list archive

Re: client library shared library version changed in 5.5.10

 

Hi, Vladislav!

> > > >> From http://dev.mysql.com/doc/refman/5.5/en/news-5-5-10.html
> > > >>>>
> > > > Incompatible Change: The shared library version of the client
> > > > library was increased to 18 to reflect ABI changes, and avoid
> > > > compatibility problems with the client library in MySQL 5.1.
> > > > Note that this is an incompatible change between 5.5.10 and
> > > > earlier 5.5 versions, so client programs that use the 5.5 client
> > > > library should be recompiled against the 5.5.10 client library.
> > >
> > > Serg, as you have now probably have full insight into the MariaDB 5.5
> > > code, is it possible to keep the API compatible with MariaDB 5.1 /
> > > MySQL 5.1 to not force all applications to have to be recompiled when
> > > upgrading to 5.5 ?
> > 
> > The API incompatibility was caused by migration to CMake.
> > If you want to keep libraries compatible, if's something that Wlad may
> > need to look into.
> 
> I do not really think it was CMake that broke it.  The "official" ABI has
> not changed, however some people claim that API and ABI are 2 different
> things ;)

The main source of the breakage is migration to CMake: making
libmysqlclient.so in 5.5 cmake builds don't use version script, and
don't use -Wl,--whole-archive.

I've run the gcc -shared line manually in 5.5 with the version script,
whole-archive, and the version changed to 16. And mysql client from 5.1
happily loaded the resulted library.

Regards,
Sergei

P.S. I had to do one more change, related to removed (from 5.5)
safemalloc, I added this to libmysql.c:

void my_no_flags_free(void *ptr) { free(ptr); }

but as we are going to restore safemalloc in our 5.5, this won't be an
issue.

P.P.S.: the api was extended in 5.5, true. but it's not a reason to
break backward compatibility - it was extended in a perfectly backward
compatible way.




Follow ups

References