From e827fc7993970a0bc9d3b6ece8b2ff7483e4f5d5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 27 Dec 2010 16:06:48 -0500 Subject: [PATCH] Add mysql_client_errors[] to the set of exported libmysqlclient symbols --- libmysql.version | 2 ++ mysql-dubious-exports.patch | 21 ++++++++++++++++----- mysql.spec | 6 +++++- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/libmysql.version b/libmysql.version index d53adbc..dcae997 100644 --- a/libmysql.version +++ b/libmysql.version @@ -126,4 +126,6 @@ libmysqlclient_16.1 { mysql_get_charset; mysql_get_charset_by_csname; mysql_net_realloc; +# PHP's mysqli.so requires this (via the ER() macro). + mysql_client_errors; }; diff --git a/mysql-dubious-exports.patch b/mysql-dubious-exports.patch index 30eeedb..3342bf8 100644 --- a/mysql-dubious-exports.patch +++ b/mysql-dubious-exports.patch @@ -1,11 +1,22 @@ Prefix mysql_ to the real names of several symbols that have to be exported -from libmysqlclient because mysql-connector-odbc depends on them. This -limits the intrusion on application namespace. +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/errmsg.h mysql-5.5.8/include/errmsg.h +--- mysql-5.5.8.orig/include/errmsg.h 2010-12-03 12:58:24.000000000 -0500 ++++ mysql-5.5.8/include/errmsg.h 2010-12-27 14:29:59.184552374 -0500 +@@ -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 + } 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-23 15:19:43.997552393 -0500 ++++ mysql-5.5.8/include/my_sys.h 2010-12-27 14:27:23.956926896 -0500 @@ -227,6 +227,7 @@ /* charsets */ @@ -26,7 +37,7 @@ diff -Naur mysql-5.5.8.orig/include/my_sys.h mysql-5.5.8/include/my_sys.h extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, diff -Naur mysql-5.5.8.orig/include/mysql.h.pp mysql-5.5.8/include/mysql.h.pp --- mysql-5.5.8.orig/include/mysql.h.pp 2010-12-03 12:58:24.000000000 -0500 -+++ mysql-5.5.8/include/mysql.h.pp 2010-12-23 15:26:59.856608079 -0500 ++++ mysql-5.5.8/include/mysql.h.pp 2010-12-27 14:27:23.956926896 -0500 @@ -86,7 +86,7 @@ void my_net_local_init(NET *net); void net_end(NET *net); @@ -38,7 +49,7 @@ diff -Naur mysql-5.5.8.orig/include/mysql.h.pp mysql-5.5.8/include/mysql.h.pp my_bool net_write_command(NET *net,unsigned char command, diff -Naur mysql-5.5.8.orig/include/mysql_com.h mysql-5.5.8/include/mysql_com.h --- mysql-5.5.8.orig/include/mysql_com.h 2010-12-03 12:58:24.000000000 -0500 -+++ mysql-5.5.8/include/mysql_com.h 2010-12-23 15:18:08.955552431 -0500 ++++ mysql-5.5.8/include/mysql_com.h 2010-12-27 14:27:23.957927198 -0500 @@ -448,6 +448,7 @@ void my_net_local_init(NET *net); void net_end(NET *net); diff --git a/mysql.spec b/mysql.spec index 0a73020..c0f4c29 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,6 +1,6 @@ Name: mysql Version: 5.5.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases URL: http://www.mysql.com @@ -596,6 +596,10 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Mon Dec 27 2010 Tom Lane 5.5.8-2 +- Add mysql_client_errors[] to the set of exported libmysqlclient symbols; + needed by PHP. + * Thu Dec 23 2010 Tom Lane 5.5.8-1 - Update to MySQL 5.5.8 (major version bump). Note this includes removal of libmysqlclient_r.so.