diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2013-01-25 17:26:10 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2013-01-25 17:26:10 +0100 |
commit | 76400fcc258c1895dcaed4c4c3ebbdc340d7a62a (patch) | |
tree | 29339ac9e6f59385e0271fc584be7f984a2daf0b /libmysqld | |
parent | 8864940583fa7e5717ccfbfcdc95d4ded8b40e1e (diff) | |
download | mariadb-git-76400fcc258c1895dcaed4c4c3ebbdc340d7a62a.tar.gz |
MDEV-3842, MDEV-3923 :
Miscellaneous workarounds for drop-in compatibility problems with Linux distributions, arounf versioning of the
MySQL 5.5 client shared library. There seems to be 3 different ways major distributions handle versioning
1. Fedora (also Mageia, and likely other Redhat descendants) way
old, 5.1 API functions are given version libmysqlclient_16
new API functions (client plugins, mysql_stmt_next ) are given version libmysqlclient_18
some extra functions beyond API are exported.
some functions are renamed.
2.Debian Wheezy way
all functions are given libmysqlclient_18 version
3. Ubuntu way (or MySQL/MariaDB download packages)
no versioning
UIp to this fix, MariaDB distributions did not have any versioning in the libraries, this rendered client library incompatible to distributions
thus exchanging distribution's libmysqlclient.so.18.0.0 with MariaDB's did not work nicely (anywhere but on Ubuntu)
THE FIX
is to build libraries the same way as distributions do it
- when building RPMs, use same version script as Fedora does, Make sure to export extra-symbols, the same as Fedora exports.
- when building DEBs, use the same version script as Debian Wheezy
- do not use version scripts otherwise
Also, makes sure that extensions of MySQL APIs (asynchronous client functionality) is exported by the shared libraries.
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index c40beb5f9a1..c071356715f 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -146,8 +146,19 @@ IF(UNIX) ${CMAKE_STATIC_LIBRARY_PREFIX}mysqld-debug) ENDIF() +# List of exported functions in embedded (client api except client plugin or +# async (*_start/*_cont functions) + +SET(EMBEDDED_API) +FOREACH(f ${CLIENT_API}) + IF(NOT(f MATCHES "plugin|_start$|_cont$")) + SET(EMBEDDED_API ${EMBEDDED_API) ${f}) + ENDIF() +ENDFOREACH() +MESSAGE("embedded api=${EMBEDDED_API}") + IF(NOT DISABLE_SHARED) - MERGE_LIBRARIES(libmysqld SHARED mysqlserver EXPORTS ${CLIENT_API_FUNCTIONS} + MERGE_LIBRARIES(libmysqld SHARED mysqlserver EXPORTS ${EMBEDDED_API} COMPONENT Server) IF(UNIX) # Name the shared library, handle versioning (provides same api as client |