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. --- 5.5_orig/include/errmsg.h 2011-12-27 21:16:50.934455753 +0100 +++ 5.5/include/errmsg.h 2011-12-27 21:19:14.203380244 +0100 @@ -24,6 +24,7 @@ #endif void init_client_errs(void); void finish_client_errs(void); +#define client_errors mysql_client_errors /* namespace sanity */ extern const char *client_errors[]; /* Error messages */ #ifdef __cplusplus } --- 5.5_orig/include/mysql_com.h 2011-12-27 21:16:50.934455753 +0100 +++ 5.5/include/mysql_com.h 2011-12-27 21:19:14.203380244 +0100 @@ -464,6 +464,7 @@ void my_net_local_init(NET *net); void net_end(NET *net); void net_clear(NET *net, my_bool clear_buffer); +#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); --- 5.5_orig/include/mysql.h.pp 2011-12-27 21:16:50.934455753 +0100 +++ 5.5/include/mysql.h.pp 2011-12-27 21:19:14.203380244 +0100 @@ -86,7 +86,7 @@ void my_net_local_init(NET *net); void net_end(NET *net); void net_clear(NET *net, my_bool clear_buffer); -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, --- 5.5_orig/include/my_sys.h 2011-12-27 21:16:50.935455737 +0100 +++ 5.5/include/my_sys.h 2011-12-27 21:19:14.203380244 +0100 @@ -220,6 +220,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 struct charset_info_st compiled_charsets[]; @@ -947,6 +948,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,