mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
76400fcc25
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.
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
/*
|
|
Provide aliases for several symbols, to support drop-in replacement for
|
|
MariaDB on Fedora and several derives distributions.
|
|
|
|
These distributions redefine several symbols (in a way that is no compatible
|
|
with either MySQL or MariaDB) and export it from the client library ( as seen
|
|
e.g from this patch)
|
|
http://lists.fedoraproject.org/pipermail/scm-commits/2010-December/537257.html
|
|
|
|
MariaDB handles compatibility distribution by providing the same symbols from
|
|
the client library if it is built with -DRPM
|
|
|
|
*/
|
|
#include <errmsg.h>
|
|
#include <my_sys.h>
|
|
#include <mysql.h>
|
|
extern "C" {
|
|
|
|
CHARSET_INFO *mysql_default_charset_info = default_charset_info;
|
|
|
|
CHARSET_INFO *mysql_get_charset(uint cs_number, myf flags)
|
|
{
|
|
return get_charset(cs_number, flags);
|
|
}
|
|
|
|
CHARSET_INFO *mysql_get_charset_by_csname(const char *cs_name,
|
|
uint cs_flags, myf my_flags)
|
|
{
|
|
return get_charset_by_csname(cs_name, cs_flags, my_flags);
|
|
}
|
|
|
|
|
|
my_bool mysql_net_realloc(NET *net, size_t length)
|
|
{
|
|
return net_realloc(net,length);
|
|
}
|
|
|
|
const char **mysql_client_errors = client_errors;
|
|
|
|
} /*extern "C" */
|
|
|