Prefix mysql_ to the real names of several symbols that have to be exported from libmysqlclient because mysql-connector-odbc and/or PHP depend on them. This limits the intrusion on application namespace. diff -Naur mysql-5.5.8.orig/include/my_sys.h mysql-5.5.8/include/my_sys.h --- mysql-5.5.8.orig/include/my_sys.h 2010-12-03 12:58:24.000000000 -0500 +++ mysql-5.5.8/include/my_sys.h 2010-12-27 14:27:23.956926896 -0500 @@ -227,6 +227,7 @@ /* charsets */ #define MY_ALL_CHARSETS_SIZE 2048 +#define default_charset_info mysql_default_charset_info /* namespace sanity */ extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]; extern CHARSET_INFO compiled_charsets[]; @@ -914,6 +915,9 @@ extern uint get_collation_number(const char *name); extern const char *get_charset_name(uint cs_number); +#define get_charset mysql_get_charset /* namespace sanity */ +#define get_charset_by_csname mysql_get_charset_by_csname + extern CHARSET_INFO *get_charset(uint cs_number, myf flags); extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, --- percona-server-5.7.12-5/include/mysql.h.pp~ 2016-06-01 09:44:09.000000000 +0300 +++ percona-server-5.7.12-5/include/mysql.h.pp 2016-06-20 09:12:25.119724253 +0300 @@ -128,7 +128,7 @@ void net_end(NET *net); void net_clear(NET *net, my_bool check_buffer); void net_claim_memory_ownership(NET *net); -my_bool net_realloc(NET *net, size_t length); +my_bool mysql_net_realloc(NET *net, size_t length); my_bool net_flush(NET *net); my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); my_bool net_write_command(NET *net,unsigned char command, --- percona-server-5.7.12-5/include/mysql_com.h~ 2016-06-01 09:44:09.000000000 +0300 +++ percona-server-5.7.12-5/include/mysql_com.h 2016-06-20 09:12:01.301815678 +0300 @@ -509,6 +509,7 @@ void net_end(NET *net); void net_clear(NET *net, my_bool check_buffer); void net_claim_memory_ownership(NET *net); +#define net_realloc mysql_net_realloc /* namespace sanity */ my_bool net_realloc(NET *net, size_t length); my_bool net_flush(NET *net); my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); --- mysql-5.5.9/include/m_string.h~ 2011-01-20 00:37:08.000000000 +0200 +++ mysql-5.5.9/include/m_string.h 2011-03-31 16:36:35.184588054 +0300 @@ -118,6 +118,7 @@ extern size_t strnlen(const char *s, size_t n); #endif +#define is_prefix mysql_is_prefix /* namespace sanity */ extern int is_prefix(const char *, const char *); /* Conversion routines */